Window close button not responding

2 posts, 1 answers
  1. Yeroon
    Yeroon avatar
    87 posts
    Member since:
    Oct 2012

    Posted 02 Jul 2009 Link to this post

     

     

     

     

     

    Hello,

    I have the follwoing code on my aspx page. When ommiting the line oWnd.show(); in the javascript function the Close button on the radwindow is not working. When I take out that line, everything else is working as expected. Is this problem by design or am I missing something? Can you elaborate on the difference between using and not using the oWnd.show(); ? Using 2009 Q1 release.

    <telerik:RadCodeBlock> 
     
    <script> 
     
     
     
    function openWin() {  
     
    var activiteitSettings = document.getElementById('<%=activeActiviteitType.ClientID %>').value;  
     
    var oWnd = $find("<%=RadWindow1.ClientID%>");  
     
    var pos = GetTopLeftPosition(event.srcElement);  
     
    dirty = 0;  
     
    var d = Date.parseDate(document.getElementById('<%=infoArray.ClientID %>').value, "d-m-yy");  
     
    var voor = document.getElementById('<%=voor.ClientID %>').value;  
     
     
    if (activiteitSettings == 0)  
     
    oWnd.setUrl("PopForms/Pop_Activiteit_Edit.aspx?urenoid=" + event.srcElement.id + "&g=" + voor + "&maandag=" + d.getDate() + '-' + eval(d.getMonth() + 1) + '-' + d.getFullYear());  
     
    else if (activiteitSettings == 1)  
     
    oWnd.setUrl("PopForms/Pop_Activiteit_Edit_Select.aspx?urenoid=" + event.srcElement.id + "&g=" + voor + "&maandag=" + d.getDate() + '-' + eval(d.getMonth() + 1) + '-' + d.getFullYear());  
     
    oWnd.show();  
     
    oWnd.moveTo(pos.x + parseInt(event.srcElement.clientWidth), pos.y);  
     
     
    }  
     
    </script> 
     
    </telerik:RadCodeBlock> 
     
     
    <telerik:RadWindow ID="RadWindow1" Skin="Vista" NavigateUrl="PopForms/Pop_Activiteit_Edit.aspx" KeepInScreenBounds="true"   
     
    runat="server" Width="300px" Height="200px" ShowContentDuringLoad="false" VisibleTitlebar="true" VisibleStatusbar="false"   
     
    Behaviors="Close, Move, Resize" > 
     
    </telerik:RadWindow> 
     
  2. Answer
    Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 03 Jul 2009 Link to this post

    Hi Yeroon,

    We recommend you use the oWnd.show() function every time when you need to show the RadWindow control from client side code. This function performs some additional initializations in the RadWindow itself that are needed in order to work properly. If instead of show() some other function like moveTo() or center() is used, there will be problems like the one that you currently have.

    An exception is when you use radopen() function. In this case the show() function is called internally and you do not need to call it explicitly for the newly opened RadWindow.

    Best wishes,
    Fiko
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top