Eugene Hourany wrote: > Hi all, > > I'm tearing my hair out trying to figure out why I keep getting a > "element is null" error. Here's what my code looks like: > > $('firstname').hide(); > > and I have > > <input id="firstname" name="firstname" value="" /> > > and I get > > Error: $("firstname") is null > Source File: > file:///C:/Documents%20and%20Settings/142253/Desktop/test/index.html# > Line: 14 > > I'm doing this locally from my desktop. I'm using prototype 1.6.1.
do you have the input declaration before the execution of the "$('firstname').hide();" If you execute the js before the input is declared, the id will not exist. bill -- Bill Drescher william {at} TechServSys {dot} com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---