function ValidateMe()
{
var ok = Page_ClientValidate();
if(ok)
return confirm("Are you sure?");
else
return false;
}
I have just stumbled across a small problem. After the form validation is done, my drop down boxes will not perform a postback.
Any ideas??
I'm not sure if there is a better way to fix the problem, but I managed to replicate it and fix it. If you update the js function to this it should work:
function ValidateMe()The Page_BlockSubmit variable is set to true when validation fails and stops the page being posted back on a subsequent try, even from a dropdown which isn't causing validation. This just happens the first time - change the value in the dropdown again and the page will postback (Page_BlockSubmit is reset to false the first time you select something in your dropdown so subsequent postbacks are fine). I hope that helps.
{
var ok = Page_ClientValidate();
if(ok)
{
return confirm("Are you sure?");
}
else
{
Page_BlockSubmit = false;
return false;
}
}
No comments:
Post a Comment