RadWindow reopens after close

7 posts, 0 answers
  1. Nick
    Nick avatar
    26 posts
    Member since:
    Jan 2005

    Posted 27 Feb 2008 Link to this post

    Hi

    I am using the SizeToFit() javascript function to resize my RadWindow when it opens as per the

    I have an AjaxManager which I use the ResponseScripts to execute GetRadWindow().Close(); after saving the changes server side.

    The problem is that the RadWindow closes for a second then reopens.

    If I remove the SizeToFit function, it works ok.

    How can I get round this?

    Thanks

    Nick
  2. George
    Admin
    George avatar
    298 posts

    Posted 27 Feb 2008 Link to this post

    Hello Nick,

    Since we are not sure about yout exact setup we were unable to reproduce the reported problem.

    Could you please specify more information about the issue? We also kindly request you to send us a sample runnable project demonstrating the issue. Then we will be able to track it and to give you a proper reply right away.

    Best wishes,
    George
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nick
    Nick avatar
    26 posts
    Member since:
    Jan 2005

    Posted 27 Feb 2008 Link to this post

    Hi

    I've opened a support ticket with the sample project.

    Ticket No 124053

    Thanks

    Nick
  5. George
    Admin
    George avatar
    298 posts

    Posted 28 Feb 2008 Link to this post

    Hello Nick,

    Thanks for your sent project, you will find the solution attached in the support ticket.

    Greetings,
    George
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. mb
    mb avatar
    3 posts
    Member since:
    Oct 2006

    Posted 29 Feb 2008 Link to this post

    what was the solution here?

    We are using the provided js code to close RadWindow via standard form button.

    - It works in FireFox but not in IE
    - No Ajax on the page
    - The RadWindow immediately reloads (only in IE)

    What is the fix?
  7. Nick
    Nick avatar
    26 posts
    Member since:
    Jan 2005

    Posted 29 Feb 2008 Link to this post

    Hi mb

    Heres the updated code from my <head> script.

            <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 CloseOnReload() {  
                setTimeout(function()  
                {  
                    GetRadWindow().Close();  
                },800);  
            }  
            </script> 
     

    And the resize window script from the <body onload="SizeToFit()">

            <script type="text/javascript">  
          function SizeToFit()  
          {  
           window.setTimeout(  
               function()  
               {  
                   var oWnd = GetRadWindow();  
     
                   oWnd.SetWidth(document.body.scrollWidth + 40);  
                   oWnd.SetHeight(document.body.scrollHeight + 70);  
                   oWnd.show();  
                   oWnd.center();  
               }, 400);  
          }  
          </script> 
     

    Hope that helps

    Regards

    Nick
  8. mb
    mb avatar
    3 posts
    Member since:
    Oct 2006

    Posted 29 Feb 2008 Link to this post

    Thanks for the quick reply Nick.

    It seems my issue was something else.  I don;t yet know why , but apparently I had a cross domain problem.  I will look at it again later because I am not seeing why.

    I had to add :

    document.domain = "samedomainascallerhere";

    on the rad widow page. 

    - Both the caller and rad window page are on the same domain
    - The only js done on the rad window page is the GetRadWindow.close(); call

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017