A simple function for disabling the Submit button inorder to avoid multiple clicks by user.
function disableSubmit(whichButton)
{
if (document.getElementById)
{
// this is the way the standards work
document.getElementById(whichButton).disabled = true;
}
else if (document.all)
{
// this is the way old msie versions work
document.all[whichButton].disabled = true;
}
else if (document.layers)
{
// this is the way nn4 works
document.layers[whichButton].disabled = true;
}
}
0 comments : on " Tip: - Disable Submit button using Javascript "
Post a Comment