I was tying to use nodeType to make sure that a node was an element in my javascript, but it wasn't working. Then when I did alert(aNode.nodeType); I got undefined, I was really confused so I tried alert(document.nodeType); and I got undefined again! Is there a reason I'm getting undefined instead of DOCUMENT_NODE or 9?


Give us your demo page URL. Likely, you are alerting these values before they exist. The DOM attributes don't exist for nodes that have not been parsed yet. Are you triggering this onload, or in the head of your document?

--

        Ben Curtis : webwright
        bivia : a personal web studio
        http://www.bivia.com
        v: (818) 507-6613



******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to