views:

47

answers:

1

We have a website that needs to perform certain actions when a pop-up is being closed.

Note: Not a session end but just a popup being closed.

The solution we found so far, is catching the onunload of the page and then popup a page to perform the actions. When the new popup ends -> it hides itself and everybody's happy.

The problem happens with popup blockers, they seem to prevent our finalizer window from being executed.

Is there a way to force opening of this window? Is there a different way to execute this set of actions? (The actions are server side like closing a MF session that we opened etc.)

+2  A: 

You can use dialogs instead of popups. For example, jquery ui dialog. Then, the code for the dialog is on the same page and you can easily handle anything that happens on that page, closing of the dialog, popping the other one and so on...

cheers

Marko
can I open this sort of dialog on page unload?
Faruz
yeah, why not :)
Marko
Then I'll give it a shot. thanks.
Faruz