S
Stefan Mueller
I'm really very confused. With the following code I can add rows/fields in
frame 1 and 2. If I use IE, Mozilla or Opera the new rows/fields get added
in ascending order. However, if I use Safari the inserted rows/fields in
frame 2 are in descending order (frame 1 is in ascending order).
Is this a bug?
Is this a known problem?
How can I fix this problem?
Stefan
++++++++++++++++++++++++++++++++++++++++++
index.html
==========
<html>
<frameset rows = "*, 20%" frameborder = "0" framespacing = "0">
<frame src="frame1.html" name="frame1" scrolling="auto" noresize>
<frame src="frame2.html" name="frame2" scrolling="no" noresize>
</frameset>
</html>
++++++++++++++++++++++++++++++++++++++++++
frame1.html
===========
<html>
<head>
<script type = "text/javascript">
function newrows(formobjekt) {
tab = document.getElementById("tab1");
row = tab.insertRow(tab.rows.length - 1);
cell = row.insertCell(0);
cell.style.width = "100%";
cell.colSpan = "1";
cell.innerHTML = tab.rows.length;
tab = parent.frame2.document.getElementById("tab2");
row = tab.insertRow(tab.rows.length);
cell = row.insertCell(0);
element = parent.frame2.document.createElement("input");
element.type = "text";
element.value = tab.rows.length;
cell.appendChild(element);
}
</script>
</head>
<body>
<form name = "form1" action = "" method = "post" accept-charset =
"iso-8859-1">
<input type = "button" name = "button1" value = "newrows" onClick =
"newrows(document.form1)">
<table id = "tab1" width = "100%" border = "0">
<tr>
<td width = "100%" colspan = "1">
New rows should be added below
</td>
</tr>
<tr>
<td width = "100%" colspan = "1">
New rows should be added before
</td>
</tr>
</table>
</form>
</body>
</html>
++++++++++++++++++++++++++++++++++++++++++
frame2.html
===========
<html>
<body>
<form name = "form2" target = "frame2" action = "" method = "post"
accept-charset = "iso-8859-1">
<table id = "tab2" width = "100%" border = "0">
<tr>
<td>
<input type = "text" name = "field2" style = "width:300px"
value = "New fields should be added below">
</td>
</tr>
</table>
</form>
</body>
</html>
frame 1 and 2. If I use IE, Mozilla or Opera the new rows/fields get added
in ascending order. However, if I use Safari the inserted rows/fields in
frame 2 are in descending order (frame 1 is in ascending order).
Is this a bug?
Is this a known problem?
How can I fix this problem?
Stefan
++++++++++++++++++++++++++++++++++++++++++
index.html
==========
<html>
<frameset rows = "*, 20%" frameborder = "0" framespacing = "0">
<frame src="frame1.html" name="frame1" scrolling="auto" noresize>
<frame src="frame2.html" name="frame2" scrolling="no" noresize>
</frameset>
</html>
++++++++++++++++++++++++++++++++++++++++++
frame1.html
===========
<html>
<head>
<script type = "text/javascript">
function newrows(formobjekt) {
tab = document.getElementById("tab1");
row = tab.insertRow(tab.rows.length - 1);
cell = row.insertCell(0);
cell.style.width = "100%";
cell.colSpan = "1";
cell.innerHTML = tab.rows.length;
tab = parent.frame2.document.getElementById("tab2");
row = tab.insertRow(tab.rows.length);
cell = row.insertCell(0);
element = parent.frame2.document.createElement("input");
element.type = "text";
element.value = tab.rows.length;
cell.appendChild(element);
}
</script>
</head>
<body>
<form name = "form1" action = "" method = "post" accept-charset =
"iso-8859-1">
<input type = "button" name = "button1" value = "newrows" onClick =
"newrows(document.form1)">
<table id = "tab1" width = "100%" border = "0">
<tr>
<td width = "100%" colspan = "1">
New rows should be added below
</td>
</tr>
<tr>
<td width = "100%" colspan = "1">
New rows should be added before
</td>
</tr>
</table>
</form>
</body>
</html>
++++++++++++++++++++++++++++++++++++++++++
frame2.html
===========
<html>
<body>
<form name = "form2" target = "frame2" action = "" method = "post"
accept-charset = "iso-8859-1">
<table id = "tab2" width = "100%" border = "0">
<tr>
<td>
<input type = "text" name = "field2" style = "width:300px"
value = "New fields should be added below">
</td>
</tr>
</table>
</form>
</body>
</html>