Is there a way that when i close the window the Page gets unloaded.
My example is a page with a flash control in it with sound. when i click the X to close the window closes but the page is still loaded and the music still plays. Is there a way around this?
<EDIT>
I found the answer right after my post
DestroyOnClose
My example is a page with a flash control in it with sound. when i click the X to close the window closes but the page is still loaded and the music still plays. Is there a way around this?
<EDIT>
I found the answer right after my post
DestroyOnClose
4 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 26 Jun 2009, 09:31 AM
Hi Billy,
You can also try another option, by changing changing the RadWindow's content page to some other URL in OnClientClose eventhandler, so that this will destroy the flash object on clossing the window.
JavaScript:
Thanks,
Princy.
You can also try another option, by changing changing the RadWindow's content page to some other URL in OnClientClose eventhandler, so that this will destroy the flash object on clossing the window.
JavaScript:
<script type="text/javascript"> |
function OnClientClose(oWnd) |
{ |
oWnd.setUrl("about:blank"); // Sets url to blank |
} |
</script> |
Thanks,
Princy.
0
Hello Billy,
Indeed, this is one of the ways to solve this issue. More on the subject is available in this blog post. Another solution is to use the OnClientClose eventhandler and change the content url with setUrl() to a blank page.
All the best,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Indeed, this is one of the ways to solve this issue. More on the subject is available in this blog post. Another solution is to use the OnClientClose eventhandler and change the content url with setUrl() to a blank page.
All the best,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

saritha78
Top achievements
Rank 1
answered on 15 Mar 2011, 11:51 PM
I tried both the solutions (OnClientClose event handler and DestroyOnClose). Both solutions are not working. Any ideas as to why it wouldnt work?
Thanks,
Thanks,
0
Hello saritha78,
I don't know why it is not working, but if you open a support ticket and send me a sample project, I'll check it right away.
Best wishes,
Georgi Tunev
the Telerik team
I don't know why it is not working, but if you open a support ticket and send me a sample project, I'll check it right away.
Best wishes,
Georgi Tunev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!