This is a migrated thread and some comments may be shown as answers.

Opening radwindow from JS

1 Answer 122 Views
Window
This is a migrated thread and some comments may be shown as answers.
possible
Top achievements
Rank 1
possible asked on 06 Apr 2008, 09:57 AM
Hi all,

I have such code:
 
<script type="text/javascript"
 
    <%= navBar.Toolbar.ClientID %>.attachEvent("OnClientClick","nav_click"); 
 
    function OpenWindow (name){    
        var oManager = GetRadWindowManager(); 
        var oMailWnd = oManager.GetWindowByName(name); 
        if (oMailWnd) 
        {    
            oMailWnd.SetUrl(oMailWnd.GetUrl()); 
            oMailWnd.SetActive(true); 
            oMailWnd.Show(); 
        } 
        else{ 
            alert(name); 
        } 
    } 
     
    function nav_click(sender, e) 
    { 
        if (sender.CommandName=="NewSheet"){ 
            OpenWindow('wndNewSheet'); 
            return false; 
        } 
    } 
     
    function wndNewSheet_Close(radWindow) 
    { 
     
    } 
 
</script> 
 
<telerik:RadWindowManager ID="wndMgr" runat="server" ShowContentDuringLoad="false"
    <Windows> 
        <telerik:RadWindow ID="wndNewSheet" NavigateUrl="~/DesktopModules/Maxon/Costs/NewSheet.aspx" OnClientClose="wndNewSheet_Close" Width="400px" Height="300px" runat="server" VisibleStatusbar="false" /> 
    </Windows> 
</telerik:RadWindowManager> 
 

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 :-)

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 07 Apr 2008, 12:23 PM
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
Tags
Window
Asked by
possible
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or