[thelist] Another basic JavaScript question
Hassan Schroeder
hassan at webtuitive.com
Sat Oct 18 11:46:52 CDT 2003
john at johnallsopp.co.uk wrote:
> function menu2(menu1)
> {
> menu2 = new Array (7, 7);
> getElementById(myElement).firstChild.nodeValue="Donkey";
> It throws, first of all, menu2 is not a function, then getElementById is
> not defined.
Uh, well -- right off I'd say having both a function and an array
within that function with the *same name* is A Bad Thing... :-)
And it should be `document.getElementById(myElement).`
HTH!
--
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
dream. code.
More information about the thelist
mailing list