470,648 Members | 1,562 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,648 developers. It's quick & easy.

problem with dynamically created tables

I need some help with the following code
It should be changing the report whenever the row array is changed,
but it isn't.
I've done some editing to remove parts of the code that I don't think
apply to the problem, I can show you the whole thing if that will make
a difference.
I've asked on other forums without luck.

<! 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">

function toggleStripe()
{
if (stripeColor)
{
stripeColor = ""
}
else
{
stripeColor = " bgcolor=\"#CCCCCC\""
}
}

var row=top.menu.row
var arrOrgList = new Array("DO","LO","LO","DO","PA","PA");
var arrPosList = new
Array("quincy","quincy","test","test","test2","tes ter");
var arrOfficeKeyList = new Array("11","3","2","1","13","12");
var arrRghtsTypeList = new
Array("Editor","Reviewer","Reviewer","Reviewer","R eviewer","Editor");
var arrRghtsUserKeyList = new Array("1","1","1","1","1","1");

var arrOfficeKeyListTwo = new Array();
var arrActiveDateList = new Array();
var arrLocationList = new Array();
var arrLeaveTypeList = new Array();

var arrOrgListTwo = new Array("LO");
var arrDescriptionList = new Array("testing");
var arrActiveDateListTwo = new Array("3/5/2004");

row = top.menu.row
stripeColor = ""

for (i=0; i<row.length; i++)
{
var strOrg = row[i];
/*
* add Org Master Table to tblAvailReport
*/
var orgMainTableRow = document.createElement("TR");
tblAvailReport.appendChild(orgMainTableRow);

var orgMainTableCell = document.createElement("TD");
orgMainTableRow.appendChild(orgMainTableCell);

var orgTable = document.createElement("TABLE");
orgTable.setAttribute ("border", "1");
orgMainTableRow.appendChild (orgTable);

/*
* add Org Master Table Header called orgHeaderRow
*/

var orgHeaderRow = document.createElement("TR");
orgTable.appendChild(orgHeaderRow);
var orgHeaderCell = document.createElement("TD");
var orgName = document.createTextNode(strOrg);
orgHeaderCell.appendChild(orgName);
var teststring = document.createTextNode("teststring");
orgHeaderCell.appendChild(teststring);
orgHeaderRow.appendChild(orgHeaderCell);
/*
* Add table in which Org/Pos and day events will be detailed called
OrgPosEventsTable
*/
var orgPosEventsTableRow = document.createElement("TR");
var orgPosEventsTableCell = document.createElement("TD");
var OrgPosEventsTable = document.createElement("TABLE");
orgPosEventsTableCell.colspan = "8"
OrgPosEventsTable.setAttribute ("border", "1")
orgPosEventsTableCell.appendChild(OrgPosEventsTabl e);
orgPosEventsTableRow.appendChild(orgPosEventsTable Cell);

stripecolor = " bgcolor=\"#CCCCCC\"";
}

</script>

</body>
</html>
Jul 23 '05 #1
1 1120
Netscape répond : top.menu has no properties
GR

NewmanBT a écrit:
I need some help with the following code
It should be changing the report whenever the row array is changed,
but it isn't.
I've done some editing to remove parts of the code that I don't think
apply to the problem, I can show you the whole thing if that will make
a difference.
I've asked on other forums without luck.

<! 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">

function toggleStripe()
{
if (stripeColor)
{
stripeColor = ""
}
else
{
stripeColor = " bgcolor=\"#CCCCCC\""
}
}

var row=top.menu.row
var arrOrgList = new Array("DO","LO","LO","DO","PA","PA");
var arrPosList = new
Array("quincy","quincy","test","test","test2","tes ter");
var arrOfficeKeyList = new Array("11","3","2","1","13","12");
var arrRghtsTypeList = new
Array("Editor","Reviewer","Reviewer","Reviewer","R eviewer","Editor");
var arrRghtsUserKeyList = new Array("1","1","1","1","1","1");

var arrOfficeKeyListTwo = new Array();
var arrActiveDateList = new Array();
var arrLocationList = new Array();
var arrLeaveTypeList = new Array();

var arrOrgListTwo = new Array("LO");
var arrDescriptionList = new Array("testing");
var arrActiveDateListTwo = new Array("3/5/2004");

row = top.menu.row
stripeColor = ""

for (i=0; i<row.length; i++)
{
var strOrg = row[i];
/*
* add Org Master Table to tblAvailReport
*/
var orgMainTableRow = document.createElement("TR");
tblAvailReport.appendChild(orgMainTableRow);

var orgMainTableCell = document.createElement("TD");
orgMainTableRow.appendChild(orgMainTableCell);

var orgTable = document.createElement("TABLE");
orgTable.setAttribute ("border", "1");
orgMainTableRow.appendChild (orgTable);

/*
* add Org Master Table Header called orgHeaderRow
*/

var orgHeaderRow = document.createElement("TR");
orgTable.appendChild(orgHeaderRow);
var orgHeaderCell = document.createElement("TD");
var orgName = document.createTextNode(strOrg);
orgHeaderCell.appendChild(orgName);
var teststring = document.createTextNode("teststring");
orgHeaderCell.appendChild(teststring);
orgHeaderRow.appendChild(orgHeaderCell);
/*
* Add table in which Org/Pos and day events will be detailed called
OrgPosEventsTable
*/
var orgPosEventsTableRow = document.createElement("TR");
var orgPosEventsTableCell = document.createElement("TD");
var OrgPosEventsTable = document.createElement("TABLE");
orgPosEventsTableCell.colspan = "8"
OrgPosEventsTable.setAttribute ("border", "1")
orgPosEventsTableCell.appendChild(OrgPosEventsTabl e);
orgPosEventsTableRow.appendChild(orgPosEventsTable Cell);

stripecolor = " bgcolor=\"#CCCCCC\"";
}

</script>

</body>
</html>


Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Thanks | last post: by
7 posts views Thread by Girish | last post: by
1 post views Thread by Korara | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.