Eye of Design helps users find information on web design and development along with feature a gallary of works created by Gary R. Hess.

One Click JavaScript for Forms

Almost every website has at least one form; be it for email, buying, or even registering new users. However, some web surfers still do not know about the one click policy.

To insure yourself of unneeded server work or emails, it is vital that you use this simple, but powerful script in your forms.

var submitted = 0; function oneclick() { submitted++; if (submitted > 1) { alert("Form already submitted, please be patient"); return false; } }

Then in the input for your submit button write:

onclick=”oneclick();”

It's that simple! And yet so powerful.