Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Window.Close in IE 7

Status
Not open for further replies.

bdbmeag

Programmer
Oct 5, 2008
15
0
0
US
Hi,

I have an html page with frames. I'm using IE7 (it's an intranet). I'm using the onUnLoad event to close the current page and open a new page when the user clicks the back arrow. Here's the current iteration of my code:

<code>
<BODY onUnLoad="loadSummary()">

<script language="JavaScript">

function loadSummary() {
window.close("DetailMain.html");
window.open("SummaryMain.html");
}

</script>

...
</code>

It does open up the new page but keeps the old page in a window behind it.

At this time it is not possible to go to a non-frame framework ... that will be done in the near future.

How I solve this using the current structure?

Thanks,

- Bruce
 
FYI, I tried some other variations but can not seem to post them as I am getting an error.
 
Have you tried [tt]window.open(...)[/tt] before [tt]window.close();[/tt]? You'd need to open a new window before closing the window that's trying to open it.

----
 
The window I'm closing, DetailMain.html, is the active window.

Do I need to do something different in that case?

Thanks,
 
did you try

Code:
function loadSummary() {
    window.open("SummaryMain.html");
    window.close();
}

----
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top