Saturday, April 13, 2024
 Popular · Latest · Hot · Upcoming
rated 0 times [  43] [ 3]  / answers: 1 / hits: 21700  / 15 Years ago, wed, march 11, 2009, 12:00:00

On my submit button, what I'd like to do is OnClick show a Please wait panel and hide the button, UNLESS the validators say something's invalid - then I need the buttons still showing obviously. Otherwise I have a validation summary showing erros and no way to submit again.

Most articles I find about doing this want to use Page_ClientValidate() function to tell the page to validate itself, but this comes back undefined for me, as does Page_IsValid variable. Here is the function I'm trying to use - what am I missing?:

function PleaseWaitShow() {
try {

var isPageValid = true;

// Do nothing if client validation is not active
if (typeof(Page_Validators) == undefined) {
if (typeof(Page_ClientValidate) == 'function') {
isPageValid = Page_ClientValidate();
alert(Page_ClientValidate returned: + isPageValid);
alert(Page_IsValid= + Page_IsValid);
} else {
alert(Page_ClientValidate function undefined);
} else {
alert(Page_Validators undefined);

if(isPageValid) {
// Hide submit buttons
document.getElementById('pnlSubmitButton').style.visibility = 'hidden';
document.getElementById('pnlSubmitButton').style.display = 'none';

// Show please wait panel
document.getElementById('pnlPleaseWait').style.visibility = 'visible';
document.getElementById('pnlPleaseWait').style.display = 'block';
} else {
alert(page not valid - don't show please wait);
} catch(er) {
alert(ERROR in PleaseWaitShow(): + er);

More From »


I believe I've found a kind of answer.

I still cannot identify why my page will not identify Page_ClientValidate() or Page_IsValid - this part is still unanswered.

However, I am using a number of PeterBlum validators on the page, and those do provide a VAM_ValOnSubmit() that returns true/false. So this may be the solution. I might just have to be sure all the validators are PeterBlum to catch them all.

Not the greatest solution, but better than I've gotten so far. I'm still open to answers on the Page_IsValid portion.

[#99865] Wednesday, March 4, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 166
Total Questions: 94
Total Answers: 117

Location: Gabon
Member since Sat, Jul 25, 2020
4 Years ago