If
you have been on ebay you will notice that when you click on certain
buttons they are grayed out and you cannot click on them anymore. This
is a feature used to prevent users from sudmitting a form more than
once. Here is how it works. I going to right a function which you have
to put in your js file or script header which will be executed on the
forms onSubmit even.
Javascript Code:
function disableSubmitButton(formname) {
for(i=0;i
if(formname.elements[i].type == "submit"){
formname.elements[i].disabled = true
break;
}
}
}
now to execute this function you simply added to the forms onsubmit. with the form as its only argument
Only registered users can write comments.
Please login or register.
blabh