Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


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

Using Form Elements in DHTML

Question:

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

Answer:

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
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap