J
Jim Brandley
I have a required field with a client-side validator. It works as advertised
until I try to add code to block double submits and replace the image on
the submit button to give the users some feedback. I have localized the
problem to the definition of the form.onSubmit handler.
Without my blocker, it looks like:
onsubmit="ValidatorOnSubmit();"
Since my javascript to block the double submit and change the image should
only run if client-side validation passes, I have to insert the
ValidatorOnSubmit call before my script is invoked, then dot net adds it
again at the end. So, it looks like:
onsubmit="if (FormSubmitted == true){return
false;};ValidatorOnSubmit();BlockDoubleSubmit(SubmitButtonID);ValidatorOnSub
mit();"
Looks like it should work, but now the client-side validation does not take
place at all. I am out of ideas. Is there another way to get a script
function invoked only if the client-side validation passes?
Any help would be much appreciated.
until I try to add code to block double submits and replace the image on
the submit button to give the users some feedback. I have localized the
problem to the definition of the form.onSubmit handler.
Without my blocker, it looks like:
onsubmit="ValidatorOnSubmit();"
Since my javascript to block the double submit and change the image should
only run if client-side validation passes, I have to insert the
ValidatorOnSubmit call before my script is invoked, then dot net adds it
again at the end. So, it looks like:
onsubmit="if (FormSubmitted == true){return
false;};ValidatorOnSubmit();BlockDoubleSubmit(SubmitButtonID);ValidatorOnSub
mit();"
Looks like it should work, but now the client-side validation does not take
place at all. I am out of ideas. Is there another way to get a script
function invoked only if the client-side validation passes?
Any help would be much appreciated.