I'm trying to create a fairly simple form which contains a label, a
button, and a textbox.
I've done quite a bit of reading and, from what I can figure, the
following should work, but isn't.
var rowCommentBox = document.create Element("TR");
var cellCommentBox = document.create Element("TD");
var frmCommentBox = document.create Element("FORM") ;
frmCommentBox.s etAttribute("ME THOD", "POST");
var strAction = "\"submitCommen ts.asp?Org=\"+s trOrg+\"&date=\ "+activeWeekBeg ins\""
frmCommentBox.s etAttribute("AC TION", strAction);
var rowFrmCommentBo x = document.create Element("TR");
var cellFrmCommentB oxLabel = document.create Element("TD");
var strFrmCommentLa bel = document.create TextNode("comme nt:");
var cellFrmCommentB oxButton = document.create Element("TD");
var btnFrmCommentBo xButton = document.create Element("INPUT" );
btnFrmCommentBo xButton.setAttr ibute("TYPE", "SUBMIT");
btnFrmCommentBo xButton.setAttr ibute("VALUE", "UPDATE");
var cellFrmCommentB oxTxtbx = document.create Element("TD");
var txtbxFrmComment BoxTxtbx = document.create Element("INPUT" );
txtbxFrmComment BoxTxtbx.setAtt ribute("TYPE", "TEXT");
txtbxFrmComment BoxTxtbx.setAtt ribute("cols", "50");
txtbxFrmComment BoxTxtbx.setAtt ribute("VALUE", strComments);
cellFrmCommentB oxLabel.appendC hild(strFrmComm entLabel);
rowFrmCommentBo x.appendChild(c ellFrmCommentBo xLabel);
cellFrmCommentB oxButton.append Child(btnFrmCom mentBoxButton);
rowFrmCommentBo x.appendChild(c ellFrmCommentBo xButton);
cellFrmCommentB oxTxtbx.appendC hild(txtbxFrmCo mmentBoxTxtbx);
rowFrmCommentBo x.appendChild(c ellFrmCommentBo xTxtbx);
frmCommentBox.a ppendChild(rowF rmCommentBox);
rowCommentBox.a ppendChild(frmC ommentBox);
tbodyOrgToAdd.a ppendChild(rowC ommentBox);
help would be greatly appreciated.
button, and a textbox.
I've done quite a bit of reading and, from what I can figure, the
following should work, but isn't.
var rowCommentBox = document.create Element("TR");
var cellCommentBox = document.create Element("TD");
var frmCommentBox = document.create Element("FORM") ;
frmCommentBox.s etAttribute("ME THOD", "POST");
var strAction = "\"submitCommen ts.asp?Org=\"+s trOrg+\"&date=\ "+activeWeekBeg ins\""
frmCommentBox.s etAttribute("AC TION", strAction);
var rowFrmCommentBo x = document.create Element("TR");
var cellFrmCommentB oxLabel = document.create Element("TD");
var strFrmCommentLa bel = document.create TextNode("comme nt:");
var cellFrmCommentB oxButton = document.create Element("TD");
var btnFrmCommentBo xButton = document.create Element("INPUT" );
btnFrmCommentBo xButton.setAttr ibute("TYPE", "SUBMIT");
btnFrmCommentBo xButton.setAttr ibute("VALUE", "UPDATE");
var cellFrmCommentB oxTxtbx = document.create Element("TD");
var txtbxFrmComment BoxTxtbx = document.create Element("INPUT" );
txtbxFrmComment BoxTxtbx.setAtt ribute("TYPE", "TEXT");
txtbxFrmComment BoxTxtbx.setAtt ribute("cols", "50");
txtbxFrmComment BoxTxtbx.setAtt ribute("VALUE", strComments);
cellFrmCommentB oxLabel.appendC hild(strFrmComm entLabel);
rowFrmCommentBo x.appendChild(c ellFrmCommentBo xLabel);
cellFrmCommentB oxButton.append Child(btnFrmCom mentBoxButton);
rowFrmCommentBo x.appendChild(c ellFrmCommentBo xButton);
cellFrmCommentB oxTxtbx.appendC hild(txtbxFrmCo mmentBoxTxtbx);
rowFrmCommentBo x.appendChild(c ellFrmCommentBo xTxtbx);
frmCommentBox.a ppendChild(rowF rmCommentBox);
rowCommentBox.a ppendChild(frmC ommentBox);
tbodyOrgToAdd.a ppendChild(rowC ommentBox);
help would be greatly appreciated.
Comment