WOW!
Even MS has typos on their Help pages. Luckily google still helps. It should be
if (typeof Page_Validators !="undefined")...
In other words, no parens after typeof.
>>Hi everybody,
>>
>>I have the following code:
>>
>>
>>function showReqFld(){
>> var pBlk=parent.document.getElementById('spnStat').innerHTML;
>> if(!pBlk||pBlk.match("Edit")) {
>> if (Page_Validators) {
>> for (i=0;i<Page_Validators.length;i++) {
>> if(Page_Validators[i].innerHTML.match('Required'))Page_Validators[i].style.display="block";
>> }
>> }
>> }
>> var Loading = parent.document.getElementById('loading');
>> if (Loading)
>> Loading.style.display="none";
>>}
>>
>>However, despite the added check for if (Page_Validators) it still fails saying Page_Validators is undefined. What is the appropriate way to test for the existence of Page_Validators?
>>
>>Thanks in advance.
>
>A very hard googling helped me to find the solution only to this particular problem in
http://msdn.microsoft.com/en-us/library/aa479045.aspx>
>
>// Do nothing if client validation is not active
> if (typeof(Page_Validators) == "undefined") return;
>
>
>My major problem of displaying required validation messages for User Controls remain.
>
>UPDATE. It doesn't seem to work, I'm still getting the same error.
If it's not broken, fix it until it is.
My Blog