chand_developer
May 17th, 2005, 02:34 AM
Hi,
Hi
I am facing a problem with a display of a table which is dynamically loaded. This table is not displaying correctly after XP service pack 2 is installed.
Would like to know how to fix this problem so that it works on all machines.
I have created a sample code to demonstrate the problem and view it on FrontPage.
When we run this code on Windows 2000 machine or XP without the service pack, it displays the titles ZERO, ONE, TWO etc upto NINE and the corresponding number below it.
When executed in XP SP2 machines, the title is ok. The dynamically inserted row gives 0 in the correct place, the box under one remains blank and the box under TWO displays a 9, the box under THREE displays a 8 and so on
Do let me know if there is any solution or a different way of achieving the correct result?
Code follows:
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<script language="javascript">
function addrow()
{
var the_table = document.getElementById('tblDetails');
var new_row_index = the_table.rows.length;
//insert a newRow
// for (new_row_index=1;new_row_index<5;new_row_index++)
// {
the_table.insertRow(new_row_index);
for(var i = 0; i < 10; i++)
{
alert('cell'+i);
the_table.rows[new_row_index].insertCell(i);
the_table.rows[new_row_index].cells[i].innerText = (i);
}
// }
}
</script>
<body>
<table border="1" width="600" id="tblDetails">
<tr class="box">
<td width="24" align="center">ZERO</td>
<td width="72" align="center">ONE</td>
<td width="72" align="center">TWO</td>
<td width="72" align="center">THREE</td>
<td width="72" align="center">FOUR</td>
<td width="72" align="center">FIVE</td>
<td width="72" align="center">SIX</td>
<td width="72" align="center">SEVEN</td>
<td width="72" align="center">EIGHT</td>
<td width="72" align="center">NINE</td>
</tr>
<script>addrow()</script>
</table>
</body>
</html>
Hi
I am facing a problem with a display of a table which is dynamically loaded. This table is not displaying correctly after XP service pack 2 is installed.
Would like to know how to fix this problem so that it works on all machines.
I have created a sample code to demonstrate the problem and view it on FrontPage.
When we run this code on Windows 2000 machine or XP without the service pack, it displays the titles ZERO, ONE, TWO etc upto NINE and the corresponding number below it.
When executed in XP SP2 machines, the title is ok. The dynamically inserted row gives 0 in the correct place, the box under one remains blank and the box under TWO displays a 9, the box under THREE displays a 8 and so on
Do let me know if there is any solution or a different way of achieving the correct result?
Code follows:
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<script language="javascript">
function addrow()
{
var the_table = document.getElementById('tblDetails');
var new_row_index = the_table.rows.length;
//insert a newRow
// for (new_row_index=1;new_row_index<5;new_row_index++)
// {
the_table.insertRow(new_row_index);
for(var i = 0; i < 10; i++)
{
alert('cell'+i);
the_table.rows[new_row_index].insertCell(i);
the_table.rows[new_row_index].cells[i].innerText = (i);
}
// }
}
</script>
<body>
<table border="1" width="600" id="tblDetails">
<tr class="box">
<td width="24" align="center">ZERO</td>
<td width="72" align="center">ONE</td>
<td width="72" align="center">TWO</td>
<td width="72" align="center">THREE</td>
<td width="72" align="center">FOUR</td>
<td width="72" align="center">FIVE</td>
<td width="72" align="center">SIX</td>
<td width="72" align="center">SEVEN</td>
<td width="72" align="center">EIGHT</td>
<td width="72" align="center">NINE</td>
</tr>
<script>addrow()</script>
</table>
</body>
</html>