Hopefully this will clarify the problem
(sorry about the code dump earlier, I posted a problem here before and
someone requested to see the entire code - I thought doing that now
would save some time)
I can't, unfortunately, post a link to the page as its on an intranet.
<! DOCTYPE HTML PUBLIC "=//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Report</title>
<link href="exec.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table id = "tblAvailReport" border="1">
</table>
<script language="JavaScript">
var row = new Array("DO", "LO");
function ChangeComment()
{
var thisOrg = strOrg;
var orgFrmComment =
document.getElementById(thisOrg).getElementsByTagN ame("INPUT")[0];
alert ("org = "+thisOrg);
alert("comment = "+orgFrmComment.value);
alert("date = "+activeWeekBegins);
window.location.replace("submitComments.asp?org="+ thisOrg+"&strComments
="+orgFrmComment.value+"&Date="+activeWeekBegin s);
}
var arrOrgListTwo = new Array();
var arrDescriptionList = new Array();
var arrActiveDateListTwo = new Array();
var month = 5
var month = month - 1
var day = 17
var year = 2004
var today = new Date(year, month, day);
var week = new Array(7);
week[1] = today;
/*row = ("DO", "LO");*/
var tblOrgMainTable = document.getElementById("tblAvailReport");
var headerOrgMainTable = document.createElement("THEAD");
var rowHeaderOrgMainTable = document.createElement("TR");
var cellHeaderOrgMainTable = document.createElement("TH");
cellHeaderOrgMainTable.setAttribute("width", "25%");
var strHeaderOrgMainTableLabel = document.createTextNode
("Org/Position");
for (i=0; i<row.length; i++)
{
var strOrg = row[i];
var bodyOrgMainTable =
document.getElementById("tblAvailReport").getEleme ntsByTagName("TBODY")[
0];
var rowOrgMainTable = document.createElement("TR");
var cellOrgMainTable = document.createElement("TD");
cellOrgMainTable.colSpan = "8";
var tableOrgToAdd = document.createElement("TABLE");
tableOrgToAdd.setAttribute("border", "1");
tableOrgToAdd.setAttribute("width", "100%");
var tbodyOrgToAdd = document.createElement("TBODY");
var rowOrgHeader = document.createElement("TR");
var cellOrgHeader = document.createElement("TD");
cellOrgHeader.setAttribute("width", "25%");
var strOrgLabel = document.createTextNode(strOrg);
/*var strOrgLabel = document.createTextNode("tester");*/
cellOrgHeader.appendChild(strOrgLabel);
rowOrgHeader.appendChild(cellOrgHeader);
tbodyOrgToAdd.appendChild(rowOrgHeader);
var activeComments = "no";
/*add org comment box*/
var activeWeekBegins =
week[1].getMonth()+"/"+week[1].getDate()+"/"+week[1].getYear();
var strComments = "test";
for (m=0; m<arrOrgListTwo.length; m++)
{
if ((arrOrgListTwo[m] ==
strOrg)&&(arrActiveDateListTwo[m]==activeWeekBegins))
{
strComments = arrDescriptionList[m];
}
}
activeComments = "yes"
if (activeComments == "yes")
{
var rowCommentBox = document.createElement("TR");
var cellCommentBox = document.createElement("TD");
var strCellTbleFrmCommentBoxLabel =
document.createTextNode("comment:");
cellCommentBox.appendChild(strCellTbleFrmCommentBo xLabel);
rowCommentBox.appendChild(cellCommentBox);
var cellCommentBoxFrm = document.createElement("TD");
cellCommentBoxFrm.colSpan = "7";
var frmCommentBox = document.createElement("FORM");
frmCommentBox.setAttribute("id", strOrg);
var txtbxCellTbleFrmCommentBoxTxtBx =
document.createElement("INPUT");
txtbxCellTbleFrmCommentBoxTxtBx.type = "text";
txtbxCellTbleFrmCommentBoxTxtBx.setAttribute("onch ange",
ChangeComment);
txtbxCellTbleFrmCommentBoxTxtBx.setAttribute("widt h", "1000");
txtbxCellTbleFrmCommentBoxTxtBx.setAttribute("heig ht", "50");
var hdnCellTbleFrmCommentBoxTxtBx = document.createElement("INPUT");
hdnCellTbleFrmCommentBoxTxtBx.type = "hidden";
hdnCellTbleFrmCommentBoxTxtBx.value = strOrg;
frmCommentBox.appendChild(txtbxCellTbleFrmCommentB oxTxtBx);
frmCommentBox.appendChild(hdnCellTbleFrmCommentBox TxtBx);
cellCommentBoxFrm.appendChild(frmCommentBox);
rowCommentBox.appendChild(cellCommentBoxFrm);
tbodyOrgToAdd.appendChild(rowCommentBox);
}
else
{
var rowCommentBox = document.createElement("TR");
rowCommentBox.setAttribute("colspan", "8");
var cellCommentBoxLabel = document.createElement("TD");
strCommentBoxLabel = document.createTextNode("comment:");
var cellCommentBoxText = document.createElement("TD");
strCommentBoxText = document.createTextNode(strComments);
cellCommentBoxLabel.appendChild(strCommentBoxLabel );
rowCommentBox.appendChild(cellCommentBoxLabel);
cellCommentBoxText.appendChild(strCommentBoxText);
rowCommentBox.appendChild(cellCommentBoxText);
tbodyOrgToAdd.appendChild(rowCommentBox);
}
/*end org comment box*/
tableOrgToAdd.appendChild(tbodyOrgToAdd);
cellOrgMainTable.appendChild(tableOrgToAdd);
rowOrgMainTable.appendChild(cellOrgMainTable);
bodyOrgMainTable.appendChild(rowOrgMainTable);
stripecolor = "#CCCCCC";
}
</script>
</body>
</html>
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!