This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft 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 Java 8 in Action this week in the Java 8 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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java Script throgh DOM Object
 
Similar Threads
java Script using DOM Object
Adding Dynamic ROW to HTML Table
Setting the values in Combo using DOM objects
java Script using DOM Object
unable to set onclick for tr during dynamic table create