How to execute client-side code _after_ client-side validation?

B

Bogdan

Hi,

I'd like to display (i.e. make visible) a label after a submit button is
clicked but only if the client-side validation is successful. If I did not
care about the validation then I'd simply modify style.display of the label
in my onclick (OnClientClick) script. The problem is that my script will
execute before the validation script.
Is there a way to execute my custom script after the validation takes place?

Thanks,
Bogdan
 
B

Bogdan

Bruce,

Thanks for the reply. Your suggestion only partially worked for me. I have
a RequiredFieldValidator and RegularExpressionValidator attached to fields.
If the former fails than my onsumbit script is not executed. Unfortunately,
this is not the case for the regex validator - my onsubmit is executed
regardless if the validator fails or not. I tested it in IE, FireFox, and
Safari and got similar results.

Is OnSubmitStatement supposed to execute AFTER validators and only if the
validators are successful? I can't find any reference to it in the on-line
docs. I'd appreciate any links.

Thanks again,
Bogdan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top