This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Data element creation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Data element creation" Watch "Data element creation" New topic

Data element creation

Sen George
Ranch Hand

Joined: Sep 21, 2005
Posts: 76
The following code does not seem to create a new text box as intended. Please help.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60768

Study this line carefully:

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
FYI: IE has an issue with setting name on an element like that.

Take a look at this:

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60768

Oh yeah, I forgot about that too. So even if you correct the line I pointed out, you may still have issues in IE.

If you are going to be manipulating the DOM in this way, you are far better off adopting a library like jQuery that does all this for you with the nuances and browser differences already accounted for.
It is sorta covered in the JavaRanch Style Guide.
subject: Data element creation
Similar Threads
JS code not working.
translate from English to Hindi
Help with displaying data properly
JSP not calling JS file funtion
Options in drop-down menu