[thelist] Simple Javascript Problem

Warden, Matt mwarden at mattwarden.com
Tue Apr 9 13:38:00 CDT 2002


On Apr 9, Golf In Ohio Webmaster had something to say about [thelist]...

>I'm receiving the error "document.addnew.username.value is null or not an
>object".  I've checked and double checked and cannot seen to figure out what
>is wrong.
>
>What are some of the reasons for receiving such an error?  Any help would be
>greatly appreciated.

possible reasons:

1. case of the form name or the field name (addnew vs. addNew vs. ADDNEW)
2. if you are accessing the field in the head of the document, it may be
executing before the form loads, and therefore, the field doesn't exist
yet. you can fix this by putting the code in a function and calling it on
body.onload
3. the form doesn't exist
4. the field doesn't exist
5. you've used id rather than name to "name" the field and form

that's about all i can think of off the top of my head.

help any?

--
mattwarden
mattwarden.com




More information about the thelist mailing list