Sync files across computers for FREE click here for your free account



Disable submit buttons after they have been clicked to avoid duplicate data entry problems with your pages,  an example of how to disable submit buttons is below.

Name:

<SCRIPT LANGUAGE="JavaScript">
<!--
function disableForm(theform) {
    if (document.all || document.getElementById) {
        for (i = 0; i < theform.length; i++) {
        var tempobj = theform.elements[i];
        if (tempobj.type.toLowerCase() == "submit" || tempobj.type.toLowerCase() == "reset")
            tempobj.disabled = true;
        }

    setTimeout('alert("Your form was submitted. Submit and reset buttons were disabled.")', 2000);
    return true;
    }
}
//  -->
</script>

<center>
<form onSubmit="return disableForm(this);">
Name: <input type=text name=person>
<input type=submit><input type=reset>
</form>
</center>




No mentions on Twitter yet. (Be the first to Tweet this post)

Host your site with EUKHost and Save 10%, use coupon 10%NEW, Dedicated, VPS, Shared, Linux, Windows, Reseller - save money on web hosting with our web hosting coupons.

Similar articles on NetEvolution.co.uk