473,387 Members | 3,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1221
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Chris Powell | last post by:
I am using Excel/Access 2000 and have two large Excel files (25,000 rows each) that I wish to create linked tables in Access rather than importing into Access. The two source Excel files change...
1
by: Thanks | last post by:
I have a routine that is called on Page_Init. It retrieves folder records from a database which I display as Link Buttons in a table cell. I set the table cell's bgcolor to a default color (say...
2
by: Mike Hutton | last post by:
I have a rather odd problem. I have a SP which uses temp. tables along the way, and then returns a table of results: CREATE PROCEDURE dbo.usp_myproc( @pNameList VARCHAR(6000) ) AS
7
by: Girish | last post by:
OK.. phew. Playing with data grids for the past few days has been fun and a huge learning experience.. My problem. I have a requirement to display a gird with a gird. Within the embedded grid,...
0
by: Syoam4ka | last post by:
My project is about jewellery. I have devided my jewelery into main types, which each one of them has sub types, and each one those sub types has the jewellery. I have a tabcontainer. It includes...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.