N
NewmanBT
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.createElement("TR");
var cellCommentBox = document.createElement("TD");
var frmCommentBox = document.createElement("FORM");
frmCommentBox.setAttribute("METHOD", "POST");
var strAction = "\"submitComments.asp?Org=\"+strOrg+\"&date=\"+activeWeekBegins\""
frmCommentBox.setAttribute("ACTION", strAction);
var rowFrmCommentBox = document.createElement("TR");
var cellFrmCommentBoxLabel = document.createElement("TD");
var strFrmCommentLabel = document.createTextNode("comment:");
var cellFrmCommentBoxButton = document.createElement("TD");
var btnFrmCommentBoxButton = document.createElement("INPUT");
btnFrmCommentBoxButton.setAttribute("TYPE", "SUBMIT");
btnFrmCommentBoxButton.setAttribute("VALUE", "UPDATE");
var cellFrmCommentBoxTxtbx = document.createElement("TD");
var txtbxFrmCommentBoxTxtbx = document.createElement("INPUT");
txtbxFrmCommentBoxTxtbx.setAttribute("TYPE", "TEXT");
txtbxFrmCommentBoxTxtbx.setAttribute("cols", "50");
txtbxFrmCommentBoxTxtbx.setAttribute("VALUE", strComments);
cellFrmCommentBoxLabel.appendChild(strFrmCommentLabel);
rowFrmCommentBox.appendChild(cellFrmCommentBoxLabel);
cellFrmCommentBoxButton.appendChild(btnFrmCommentBoxButton);
rowFrmCommentBox.appendChild(cellFrmCommentBoxButton);
cellFrmCommentBoxTxtbx.appendChild(txtbxFrmCommentBoxTxtbx);
rowFrmCommentBox.appendChild(cellFrmCommentBoxTxtbx);
frmCommentBox.appendChild(rowFrmCommentBox);
rowCommentBox.appendChild(frmCommentBox);
tbodyOrgToAdd.appendChild(rowCommentBox);
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.createElement("TR");
var cellCommentBox = document.createElement("TD");
var frmCommentBox = document.createElement("FORM");
frmCommentBox.setAttribute("METHOD", "POST");
var strAction = "\"submitComments.asp?Org=\"+strOrg+\"&date=\"+activeWeekBegins\""
frmCommentBox.setAttribute("ACTION", strAction);
var rowFrmCommentBox = document.createElement("TR");
var cellFrmCommentBoxLabel = document.createElement("TD");
var strFrmCommentLabel = document.createTextNode("comment:");
var cellFrmCommentBoxButton = document.createElement("TD");
var btnFrmCommentBoxButton = document.createElement("INPUT");
btnFrmCommentBoxButton.setAttribute("TYPE", "SUBMIT");
btnFrmCommentBoxButton.setAttribute("VALUE", "UPDATE");
var cellFrmCommentBoxTxtbx = document.createElement("TD");
var txtbxFrmCommentBoxTxtbx = document.createElement("INPUT");
txtbxFrmCommentBoxTxtbx.setAttribute("TYPE", "TEXT");
txtbxFrmCommentBoxTxtbx.setAttribute("cols", "50");
txtbxFrmCommentBoxTxtbx.setAttribute("VALUE", strComments);
cellFrmCommentBoxLabel.appendChild(strFrmCommentLabel);
rowFrmCommentBox.appendChild(cellFrmCommentBoxLabel);
cellFrmCommentBoxButton.appendChild(btnFrmCommentBoxButton);
rowFrmCommentBox.appendChild(cellFrmCommentBoxButton);
cellFrmCommentBoxTxtbx.appendChild(txtbxFrmCommentBoxTxtbx);
rowFrmCommentBox.appendChild(cellFrmCommentBoxTxtbx);
frmCommentBox.appendChild(rowFrmCommentBox);
rowCommentBox.appendChild(frmCommentBox);
tbodyOrgToAdd.appendChild(rowCommentBox);
help would be greatly appreciated.