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

RadWindow OnClientClose

2 Answers 432 Views
Window
This is a migrated thread and some comments may be shown as answers.
GDPR_erased
Top achievements
Rank 1
GDPR_erased asked on 08 Aug 2008, 01:30 PM
On all of my older web applications, using the RadWindow for asp.net, I could use the following below for the OnClientClose Event.

OnClientClose="window.location.href=window.location.href;"

On the new RadWindow for AJAX, if I add this to the OnclientClose event, the page gives a Java error on page when it loads and of course does not work.

What I want to do is simply refresh the original page when they close the
RadWindow.
Any suggestions?
Thanks,
~bg

2 Answers, 1 is accepted

Sort by
0
Shaun Peet
Top achievements
Rank 2
answered on 08 Aug 2008, 06:48 PM
Try setting the property to be an actual javascript function on the page:

<telerik:radwindow ... OnClientClose="ReloadOnClientClose" ... />

<script language="javascript" type="text/javascript" />
  function ReloadOnClientClose(sender, eventArgs)
  {
     window.location.href=window.location.href;
  }
</script>

You might also wish to check out the documentation, here:

http://www.telerik.com/help/aspnet-ajax/window_programmingclientsideevents.html

Shaun.

0
Georgi Tunev
Telerik team
answered on 11 Aug 2008, 06:00 AM
Hi RSBCTrumpet,

Indeed, Shaun is right - OnClientClose accepts only the name of a Javascript function that will be executed on the corresponding event. Same holds true for the other eventhandlers - OnClientShow, OnClientPageLoad, etc.



All the best,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
GDPR_erased
Top achievements
Rank 1
Answers by
Shaun Peet
Top achievements
Rank 2
Georgi Tunev
Telerik team
Share this question
or