HTML:
<input name="submit" type="submit" class="button" value="Click Here" tabindex="13" onclick="return ValidateForm();" />
The ValidateForm () function has all the usual form validation code. Another function that I cannot run (in addition, it works fine .. example
<input name="submit" type="submit" class="button" value="Click Here" tabindex="13" onclick="disDelay(this);" />
I tried putting them both after onclick ... example
<input name="submit" type="submit" class="button" value="Click Here" tabindex="13" onclick="return ValidateForm(); disDelay(this);" />
I also tried putting one code in the same function without success.
Function disDelay () -
function disDelay(obj){ obj.setAttribute('disabled','disabled'); setTimeout(function(){obj.removeAttribute('disabled')},10000); }
It should be used as a delay so that the form does not get duplicate submissions from a few clicks. The delay is 10 seconds right now for testing purposes. I need validation and latency to work together.
source share