Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Prevent Parent Reload From Window.Open

Thread Tools

Prevent Parent Reload From Window.Open
Posts: n/a
I have a classic asp page that on the onload event, calls a function
which opens an aspx popup

<body ... onbeforeunload="MM_confirmIELeave();"

<script language="JavaScript" type="text/javascript">
var checkLeaving = true;
function MM_confirmIELeave() {
<%Response.Write "var exit_offer =
,'exit_offer','scrollbars=no,width=500,height=280' )"%>
if(exit_offer != null){
exit_offer.opener = window;


Use the Response.Write event b/c there are some server variables
sprinkled in query string that I am not showing in the example. Also,
not showing the onUnload function call, but its the same.

The problem is this. When the user clicks on the back button, the
unload event is fired, which is fine, but the parent browser is
reloaded, which I want to suppress. I have read on other posts how to
do this if the method is called from an onclick, but how to
I prevent the parent refresh when is called from
onbeforeunload? Returning false or null does not seem to work in this
case. Behavior in FireFox or Netscape is fine, no parent reload.
Thanks in advance.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
If a class Child inherits from Parent, how to implementChild.some_method if Parent.some_method() returns Parent instance ? metal Python 8 10-30-2009 10:31 AM
JavaScript refresh: <a href="#" onClick="window.location.reload( true );">Reload</a> Joshua Beall HTML 26 06-29-2007 06:31 PM
problem with reload(sys) (doing reload on the sys module) gen_tricomi Python 2 05-23-2006 10:03 AM
Is there an SNMP equivalent to "Reload in [x]" / "Reload cancel" commands? Cisco 5 05-20-2006 04:06 AM
clicking on a thumbnail in a parent window causes parent to reload PWalker Javascript 1 02-24-2005 12:56 PM