Client disconnect when running servo

I'm trying to build a program through which I can turn a servo left and right from an html server through a wifi shield. I have the HTML functioning in that when I run my program I can get an ip and see my webpage; however, when I click the link to turn my servo it gets caught in a loop and the browser says that the client was disconnected. Would y'all mind looking at it and pointing out where I'm going wrong. Thanks.

SimpleWebServerWiFi60.ino (5.1 KB)

Would y'all mind looking at it and pointing out where I'm going wrong. Thanks.

Looks like you are trying to power the servo from the arduino. When the servo tries to move the servo, the servo is in effect shorting out the power to the arduino and causing the arduino to reset. You need to use an external power supply for the servo.

Ok

You need to use an external power supply for the servo.

I tried using the standard 9volt battery attachment and blew a fuse on the shield am I doing this wrong? The positive and negative leads were attached to the positive and negative on the bread board as so.

Below is the typical way to externally power a servo. You might start with a four (or more if using rechargeable batteries) AA battery pack from radio shack.

It Worked! Thank you so much zoomkat!