window.open problem in Netscape 7.2

K

ktcorby

I have two pages in my web application that interact with each other.
One page contains two frames. One frame has a "next" link, and if you
click the link about twenty times it stops working because window.open
starts returning null.

I have included below the source for pages that replicate this problem,
which only occurs in Netscape 7.2 of the browsers I've tested. I am
trying to understand exactly what happens under the hood in Netscape
7.2 to cause this, and the best way to work around it. Please help if
you can.

The actual pages that these test pages are modelled on have quite a bit
of intricate functionality in them, and ideally I would find a
workaround that requires minimal changes in their structure. But
Netscape 7.2 has to be supported, so I will consider anything.

Thanks,
Kevin
-----------------------------------
test_res_win.html:
<html>
<head>
<title>Title Frame</title>
<script language="javascript1.2">

function change_record() {
document.record_viewer_form.recnum.value =
parseInt(document.record_viewer_form.recnum.value) + 1;
document.record_viewer_form.submit();
}

function on_load() {
window.name = 'reswin';
}

</script>
</head>
<body onLoad="on_load();">
<p>Title Frame</p>
<p><a href="javascript:change_record();">Open</a></p>
<form name="record_viewer_form" action="test_rec_view.php"
target="recview" method="post">
<input type="hidden" name="recnum" value="0">
</form>
</body>
</html>
--------------------------
test_rec_view.php:
<html>
<head>
<title>record viewer</title>
</head>
<frameset rows="50%,50%">
<frame src="test_rec_view_content.php?recnum=<? echo $recnum ?>">
<frame src="blank.html">
</frameset>
</html>
-----------------------------
test_rec_view_content.php:
<html>
<head>
<title>Record Viewer</title>
<script language="javascript1.2">

var the_reswin = null;

function on_load() {
the_reswin = window.open( '', 'reswin' );
}

function next_record() {
if ( the_reswin && !the_reswin.closed ) {
the_reswin.change_record();
}
else {
alert( 'The results window is no longer open, so you can not skip
to the next record.' );
}
}

</script>
</head>
<body onLoad="on_load();">
<p>RECNUM: <? echo $recnum ?></p>
<p><a href="javascript:next_record();">Next</a></p>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top