Checking if the page IsValid in Javascript?!

  • Thread starter Thread starter Emilio
  • Start date Start date
E

Emilio

Hi,

I have a form that contains various server validation controls, the submit
button will either open a popup box or a popup window on the client-side
click event. The question is, how do I check if the page is valid before it
gets posted back to the server so the window or box only pops up if
everything is OK? At the moment the popup occurs first then the validation.

Many thanks

Emilio
 
Hi,

Thanks for the reply, unfortunatly the my client-side onclick event seems to
be taking place before the Page_IsValid flag is updated from its default
true state. Is their any way I can get around this. The onclick attribute is
added in the last the last line of code in my page load event.

thanks
 
It is updated right when Page_ClientValidate is called. On the article, I
mentioned, is also explained how to check the status validator by validator.
You can call Page_ClientValidate yourself also.
 
Thanks Teemu,

Got it working 100%, the article doesn't mention the Page_ClientValidate
function however.

Thanks again

Emilio
 
Back
Top