Opening radwindow from JS

2 posts, 0 answers
  1. possible
    possible avatar
    77 posts
    Member since:
    Oct 2006

    Posted 06 Apr 2008 Link to this post

    Hi all,

    I have such code:
    1  
    2 <script type="text/javascript"
    3  
    4     <%= navBar.Toolbar.ClientID %>.attachEvent("OnClientClick","nav_click"); 
    5  
    6     function OpenWindow (name){    
    7         var oManager = GetRadWindowManager(); 
    8         var oMailWnd = oManager.GetWindowByName(name); 
    9         if (oMailWnd) 
    10         {    
    11             oMailWnd.SetUrl(oMailWnd.GetUrl()); 
    12             oMailWnd.SetActive(true); 
    13             oMailWnd.Show(); 
    14         } 
    15         else{ 
    16             alert(name); 
    17         } 
    18     } 
    19      
    20     function nav_click(sender, e) 
    21     { 
    22         if (sender.CommandName=="NewSheet"){ 
    23             OpenWindow('wndNewSheet'); 
    24             return false; 
    25         } 
    26     } 
    27      
    28     function wndNewSheet_Close(radWindow) 
    29     { 
    30      
    31     } 
    32  
    33 </script> 
    34  
    35 <telerik:RadWindowManager ID="wndMgr" runat="server" ShowContentDuringLoad="false"
    36     <Windows> 
    37         <telerik:RadWindow ID="wndNewSheet" NavigateUrl="~/DesktopModules/Maxon/Costs/NewSheet.aspx" OnClientClose="wndNewSheet_Close" Width="400px" Height="300px" runat="server" VisibleStatusbar="false" /> 
    38     </Windows> 
    39 </telerik:RadWindowManager> 
    40  

    And all is working Ok, whats weird that without Line 11 (SetUrl) when I run this code I get js error:

    a7 has no properties
    var _a8=parseInt(_a7.style.zIndex);

    at

    998},setActive:function(_a6){
    999var _a7=this._popupElement;
    1000if(!_a6){
    1001Sys.UI.DomElement.addCssClass(_a7,"inactivewindow");
    1002}else{
    1003var _a8=parseInt(_a7.style.zIndex);
    A bit weird :-)

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 07 Apr 2008 Link to this post

    Hello tspossible,

    I tried to reproduce the problem locally but to no avail. Please open a new support ticket and provide the following:
    1. Small project where the problem can be reproduced. Please make sure that the project can be run locally and is not missing files or database (if used).
    2. Step-by-step reproduction details.
    Once we receive your project, we will do our best to provide a solution right away.



    Sincerely yours,
    Georgi Tunev
    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
Back to Top