kopite
08-20-2003, 11:23 AM
Hi,
I am unable to extract the value out of the input box that has been creating dynamically - how do I do this:
Code:
var tbl = document.getElementById("myTbl");
var tr = tbl.insertRow();
var td = tr.insertCell(0);
td.innerHTML = "<input type='text'>";
td.setAttribute("id","myCell");
I type in say "8998" into the box but how I can extract it as when I do this it returns "undefined"..
alert(document.getElementById("myCell").value) returns "undefined"
Help!
I am unable to extract the value out of the input box that has been creating dynamically - how do I do this:
Code:
var tbl = document.getElementById("myTbl");
var tr = tbl.insertRow();
var td = tr.insertCell(0);
td.innerHTML = "<input type='text'>";
td.setAttribute("id","myCell");
I type in say "8998" into the box but how I can extract it as when I do this it returns "undefined"..
alert(document.getElementById("myCell").value) returns "undefined"
Help!