Radwindow wont close with javascript

3 posts, 0 answers
  1. Stendor
    Stendor avatar
    6 posts
    Member since:
    Feb 2013

    Posted 16 May 2013 Link to this post

    good afternoon
    I have and issue closing a radwindow with javascript
    I'm using:
    <script type="text/javascript">
               function GetRadWindow() {
                   var oWindow = null;
                   if (window.radWindow) oWindow = window.radWindow;
                   else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                   return oWindow;
               function Close() {
    Which I know it works because when I put the code below in a button it closes the radwindow
    ClientScript.RegisterStartupScript(Me.GetType(), "", "Close();", True)

    my problem is that I have a toolbar with a button running the above code, it only refreses the content which in the radwindow but it doesnt close the radwindow (the toolbar is inside a radsliding panel). Please help.
  2. Marin Bratanov
    Marin Bratanov avatar
    3564 posts

    Posted 17 May 2013 Link to this post


    I have just answered your support ticket with the same question and I am adding the information here as well.

    How exactly does the toolbar execute this code? It is possible that its client-side event handler is not attached properly and therefore the toolbar simply posts the page.

    Kind regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. DevCraft R3 2016 release webinar banner
  4. Stendor
    Stendor avatar
    6 posts
    Member since:
    Feb 2013

    Posted 22 May 2013 Link to this post

    Hi Marin,
    It works now I had to use this 
    ScriptManager.RegisterStartupScript(Me, GetType(String), "myscriptId", "closeWnd();", True)
    Thanks for your help.
Back to Top