[Javascript] What is the equivalent of document.all in Netscape?

Roland Dong rdong at cait.org
Tue May 6 08:43:10 CDT 2003


Thanks a lot,

I got it. Should do what you suggested! Thanks for your help!

Roland
On 5/1/03 3:07 PM, "Peter Brunone" <peter at brunone.com> wrote:

> Roland,
> 
>  If you're trying to access a form field (checkbox in this case), you should
> go through the form collection like this:
> 
> var gtAll=document.formName.gradeTaught;
> 
> where formName is the name of the form that contains the checkboxes you're
> trying to analyze.
> 
> Regards,
> 
> Peter
> 
> ---------- Original Message ----------------------------------
> From: Roland Dong <rdong at cait.org>
> 
>> Hi, I have the following javascript but it only works in IE. The problem is
>> document.all.gradeTaught. It does not works in Netscape. What is the
>> equivalent code for Netscape?
>> 
>> var gtChecked='';
>>    var gtAll=document.all.gradeTaught;
>>    for(var i=0; i<gtAll.length; i++)
>>    { if (gtAll[i].checked)
>>      { gtChecked=gtChecked+gtAll[i].value+"/";
>>        document.regForm.gradeTaughts.value=gtChecked;
>>      }
>>    }
>> 
>> Thanks a lot,
>> 
>> Roland
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript

-- 




More information about the Javascript mailing list