Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] RE: function not defined only in Netscape 6


  • From: javascript@xxxxxxxxxx (Hassan Schroeder)
  • Subject: [Javascript] RE: function not defined only in Netscape 6
  • Date: Mon, 19 Aug 2002 10:27:57 -0700

Miss Amy wrote:
> You can see the script in action at this link.  If you view it with
> IE or NN4, it works perfectly.  But if you view it with NN6, nothing.
> 
> http://faculty1.coloradocollege.edu/~apacheco/math/Faculty/welcome.html

   if(!document.all && document.getElementById)
   {
   //thisbrowser="NN6";

   document.getElementByName("FacImage").src=personimage[personNum].src;
   document.getElementByName("FacInfo").value=persontext[personNum];
   }

... because there *is* no function getElementByName()  -- there's
a getElementsByName() [ Element*s* plural ] that returns an array --
but the appropriate function to use here is getElementById.

FWIW!
-- 
H*
Hassan Schroeder ----------------------------- hassan@xxxxxxxxxxxxxx
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

     -- creating dynamic Web sites and applications since 1994 --