dcsimg
document.forms[0] has no properties. How could that be when I have a form on a page?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   neal_ravindran
Posted On:   Tuesday, January 7, 2003 11:33 AM

What is the solution to the error "document.forms[0] has no properties" when I know that a form is on the page!!

I get this once in a blue-moon...and I have ignored it in the past and found workarounds...But this(referring to a form on a page with a form, in javascript using "document.forms[0]") should not fail..and hence my qn. In my case I was setting a value on the page (document.forms[0].status.value="xyz")

Re: document.forms[0] has no properties. How could that be when I have a form on a page?

Posted By:   Christopher_Koenigsberg  
Posted On:   Tuesday, January 7, 2003 12:32 PM

Could it be that you were doing this in some javascript executed inside the "head" element maybe, before the "body" was rendered, so that the DOM was not all set up yet and the form indeed did not exist yet?

About | Sitemap | Contact