wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Problem while Adding table body thru javascript 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 "Problem while Adding table body thru javascript" Watch "Problem while Adding table body thru javascript" New topic
Author

Problem while Adding table body thru javascript

Deepa More
Ranch Hand

Joined: May 22, 2006
Posts: 68
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
um, can you show us some code.

Eric
Deepa More
Ranch Hand

Joined: May 22, 2006
Posts: 68
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);
}
 
Don't get me started about those stupid light bulbs.
 
subject: Problem while Adding table body thru javascript
 
Similar Threads
adding numbers
Data conversion in Hibernate
How to retrieve string representation of <INPUT> value?
question
Form Submission on drop down onchange event