Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: DHTML
Expertise: Beginner
Aug 11, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Using Form Elements in DHTML


I am having a problem accessing the form elements that are inside a DIV tag. It works in Internet Explorer but not in Netscape. The alert comes in both the browsers, but the next statement does not work in Netscape. Here is my code:




Document Title


This is in the div tag
Month Year


Try placing the FORM tag outside of the DIV, so that it is at the root level. While IE is smart enough to understand that interior FORMs should be treated in the same manner as exterior FORMs, a FORM is principally an indicator to the browser that the content contained therein should be compiled as part of the same entity for posting purposes.

Also, earlier forms in Netscape had confirmed problems with tables, especially tables that were in turn contained in other objects. This may be impacting your situation somewhat. Also, note that options require values in addition to text content (). If the parser has problems resolving situations like this, it may not end up creating the form control instances.

DevX Pro
Thanks for your registration, follow us on our social networks to keep up-to-date