This is a migrated thread and some comments may be shown as answers.

FireFox onunload

3 Answers 141 Views
Window
This is a migrated thread and some comments may be shown as answers.
Maxim Tairov
Top achievements
Rank 1
Maxim Tairov asked on 09 Feb 2009, 09:37 AM

Hello Telerik!

In my project I use RadWindow component. I have a next problem under Mozilla FireFox 3.0.6:

When I close pop-up Window internal page doesn't rise onunload event. I have prepared test project to reproduce this issue. How can I send the sample to suport team?

3 Answers, 1 is accepted

Sort by
0
Stuart Hemming
Top achievements
Rank 2
answered on 09 Feb 2009, 11:22 AM
Maxim,

I think that you've misunderstood what the Unload event is.

A Page's unload event doesn't apply when the page/window is closed but after the page has been rendered but just before all of the classes on the server are terminated.

I hope this helps.

--
Stuart
0
Maxim Tairov
Top achievements
Rank 1
answered on 09 Feb 2009, 12:19 PM
I think my first post doesn't contain a lot of information about problem. I mean JavaScript - onunload event. I have no problem under IE, but under FF it doesn't work properlly.
Please see sample Project. (VS2008)

Sample Project

default.aspx - contains button which open RadWindow with page.htm.

page.html 
catch onunload event - just show message “unload current page”. If I push reload or close icon on RadWindow - I see my message, but only in IE 7. On FF I don't see. As I know there is no problem with unload event without using RadWindow in FF.

0
Fiko
Telerik team
answered on 10 Feb 2009, 07:32 AM
Hello Maxim,

Instead of the onunload event of the content page you can use the OnClientBeforeClose event of the Radwindow control. There you can attach a function ( in the project I used the add_beforeClose() function of the RadWindow control) to this event, implement your logic in it and you can interrupt canceling if you need this. I modified your project in order to achieve the desired behavior by using the client side API of the RadWindow control and I have attached the project to this thread. 

I hope this helps.

Greetings,
Fiko
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Maxim Tairov
Top achievements
Rank 1
Answers by
Stuart Hemming
Top achievements
Rank 2
Maxim Tairov
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or