Hi,
can someone please show what i need to do to get this to work.
i have an image button on a form that when clicked checks validation then submits the form.
lately people have been clicking more than once so the form is posted twice.
have found a function that prevents this but i cant get it to work with my other onclick events
so far...
submit once function - thanks to javascript.internet.com
my image submit button
can someone please show what i need to do to get this to work.
i have an image button on a form that when clicked checks validation then submits the form.
lately people have been clicking more than once so the form is posted twice.
have found a function that prevents this but i cant get it to work with my other onclick events
so far...
submit once function - thanks to javascript.internet.com
Code:
var submitcount=0;
function checkFields() {
if (submitcount == 0)
{
submitcount++;
return true;
}
else
{
alert("This form has already been submitted. Thankyou");
return false;
}
}
my image submit button
Code:
<input name="Action" type="image" id="Action" src="images/tbot6_01.gif" width="87" height="50" border="0" onclick="return EW_checkMyForm(this.form); return checkFields(); return this.form.a.value='A';">