By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,379 Members | 1,742 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,379 IT Pros & Developers. It's quick & easy.

window close problem

P: n/a
Hello I'm a bit new to JS so be gentle :)

I have a popup window name 'popup'....

In this window content is changing according to user choice...

how can i display alert box only when this popup window is closed??

thanx...

point
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I have found a solution but I think the code isn't optimized(I have a
feeling that some lines are not used) but I don't have enough experience
with JS to optimize it by myself.....

So if some of You experienced guys could take a look at this and remove
what's not used...Or if you could do it in some other way.....

Thanx in advance...

function check_closed()
{
var top=self.screenTop;
if (top>9000)
{
alert('Don't forget to refresh your window!')
}
}

and

<body onunload="javascript:if (document.all){check_closed()} else {var
top=window.outerWidth;if (top==0) {opener.alert('window was closed')}}">

respect...

point

"point" <in**@caanproduction.com> wrote in message
news:be*********@enews1.newsguy.com...
Hello I'm a bit new to JS so be gentle :)

I have a popup window name 'popup'....

In this window content is changing according to user choice...

how can i display alert box only when this popup window is closed??

thanx...

point

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.