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 XML and Related Technologies and the fly likes java Script throgh DOM Object 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 » XML and Related Technologies
Bookmark "java Script throgh DOM Object" Watch "java Script throgh DOM Object" New topic
Author

java Script throgh DOM Object

phoby paul
Greenhorn

Joined: Jul 07, 2001
Posts: 3
I want to set the attribute 'maxlength' for my dynamically added rows. But it is not possible for me do it.
var currCell = document.createElement("TD");
var currText = document.createElement("input");
currText.setAttribute("name","mszDescription");
currText.setAttribute("type","text");
currText.setAttribute("id",currRows);
currText.setAttribute('maxlength','20');
currCell.appendChild(currText);
currRow.appendChild(currCell);
I am not able to set the maxlength attribute for dynamically added rows. All other attributes are posible to set. Please send a solution with some piece of code.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: java Script throgh DOM Object
 
Similar Threads
Adding Dynamic ROW to HTML Table
Setting the values in Combo using DOM objects
java Script using DOM Object
java Script using DOM Object
unable to set onclick for tr during dynamic table create