M
Michael Hill
I have this code that adds a table row and within the cells I create
some input elements. When I go back using javascript the functionaliuty
is seeing the form element. Anyone tell why I can see them?
<form name='update'>
myTR=document.createElement("TR");
myTR.setAttribute("id","RESULTS4");
// create cell 1 and content
myTD=document.createElement("TD");
//create input items
myINPUT=document.createElement("INPUT");
myINPUT.setAttribute("type","text");
myINPUT.setAttribute("readonly");
myINPUT.setAttribute("className","grey");
myINPUT.setAttribute("name","NAME4");
myINPUT.setAttribute("maxlength","35");
myINPUT.setAttribute("size","35");
myINPUT.setAttribute("value","somevalue");
//append the input to the cell
myTD.appendChild(myINPUT);
myTR.appendChild(myTD);
So, if when I call the input value the element is not found like:
temp1 = document.update.elements["NAME4"].value;
alert(temp1);
The error message is: "null or not an object". Somehow this element is
not getting added to the form "update".
Any help is appreciated.
Mike
some input elements. When I go back using javascript the functionaliuty
is seeing the form element. Anyone tell why I can see them?
<form name='update'>
myTR=document.createElement("TR");
myTR.setAttribute("id","RESULTS4");
// create cell 1 and content
myTD=document.createElement("TD");
//create input items
myINPUT=document.createElement("INPUT");
myINPUT.setAttribute("type","text");
myINPUT.setAttribute("readonly");
myINPUT.setAttribute("className","grey");
myINPUT.setAttribute("name","NAME4");
myINPUT.setAttribute("maxlength","35");
myINPUT.setAttribute("size","35");
myINPUT.setAttribute("value","somevalue");
//append the input to the cell
myTD.appendChild(myINPUT);
myTR.appendChild(myTD);
So, if when I call the input value the element is not found like:
temp1 = document.update.elements["NAME4"].value;
alert(temp1);
The error message is: "null or not an object". Somehow this element is
not getting added to the form "update".
Any help is appreciated.
Mike