Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Invoke client-side script after validation but before postback

$
0
0

Hi All: I have an web form with a submit button that posts back to a remote server.

I have some requiredfieldvalidator and regexvalidators that work fine; they fire the client-side validation before posting to the new server.

I have some additional JS validation that I need to perform only if the page validates client-side first. In other words, I want all the client-side validation to fire, and if everything is valid, I want to invoke one more client-side script before posting back.

Is there any way to alter the validation process so that I can execute some script after all the validators have returned "IsValid"? Something like (pseudo-code):

if(IsValid) {

//run my code

//submit()

}


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>