Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java Script throgh DOM Object

 
phoby paul
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic