Click to See Complete Forum and Search --> : writing to a table cell


zonome
06-19-2003, 11:35 AM
Hello,

I have a table with 2 rows and 2 columns. The 1st column has a drop down menu with a list of items. Once the user selects an item from the list I call a function that displays the corresponding value for the selected item. The function uses document.write to do thsi.

I would like to be able to display this value in the right hand cell of the table using. Is this possible?

pyro
06-19-2003, 12:04 PM
Give you <td> an id, like this: <td id="mytd"> and then write to it something like this:

function writeData() {
document.getElementById("mytd").innerHTML = "You text here";
}