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

Problem while Adding table body thru javascript

 
Deepa More
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am calling java script function on click of button, which adds content to tbody using appendChild. Problem I am facing is, when I move cursor to input-text added, then only its value get displayed whereas the value is set already in that function while creating it.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
um, can you show us some code.

Eric
 
Deepa More
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Function which adds data is:

function addData(name)
{
container = document.getElementById('details');
newRow = container.childNodes[0];
var nameTxtBox = newRow.childNodes[2].childNodes[0];
nameTxtBox.value = name;
nameTxtBox.style.visibility = 'visible';
container.appendChild(newRow);
}
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic