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.c reateElement("T R");
myTR.setAttribu te("id","RESULT S4");
// create cell 1 and content
myTD=document.c reateElement("T D");
//create input items
myINPUT=documen t.createElement ("INPUT");
myINPUT.setAttr ibute("type","t ext");
myINPUT.setAttr ibute("readonly ");
myINPUT.setAttr ibute("classNam e","grey");
myINPUT.setAttr ibute("name","N AME4");
myINPUT.setAttr ibute("maxlengt h","35");
myINPUT.setAttr ibute("size","3 5");
myINPUT.setAttr ibute("value"," somevalue");
//append the input to the cell
myTD.appendChil d(myINPUT);
myTR.appendChil d(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.c reateElement("T R");
myTR.setAttribu te("id","RESULT S4");
// create cell 1 and content
myTD=document.c reateElement("T D");
//create input items
myINPUT=documen t.createElement ("INPUT");
myINPUT.setAttr ibute("type","t ext");
myINPUT.setAttr ibute("readonly ");
myINPUT.setAttr ibute("classNam e","grey");
myINPUT.setAttr ibute("name","N AME4");
myINPUT.setAttr ibute("maxlengt h","35");
myINPUT.setAttr ibute("size","3 5");
myINPUT.setAttr ibute("value"," somevalue");
//append the input to the cell
myTD.appendChil d(myINPUT);
myTR.appendChil d(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
Comment