RadWindow OnClientClose

3 posts, 0 answers
  1. Bill
    Bill avatar
    94 posts
    Member since:
    Aug 2006

    Posted 08 Aug 2008 Link to this post

    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. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 08 Aug 2008 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 11 Aug 2008 Link to this post

    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.
Back to Top