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

Add Attributes in rad window

2 Answers 134 Views
Window
This is a migrated thread and some comments may be shown as answers.
Taran
Top achievements
Rank 1
Taran asked on 12 Mar 2009, 06:25 AM
Hi,

Please tell me how can i add attributes in rad window from client side.


2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Mar 2009, 09:02 AM
Hi Taran,

I hope you want to pass value as attribute of RadWindow object. I tried following aproach for this.

JavaScript in main page:
<script type="text/javascript">  
function setstatusbar()   
{  
    var oWnd = radopen ("DialogWindow.aspx",  "" );  
    oWnd.newattribute= '-hai-';  //set new attribute  
}  
</script> 

JavaScript in window page:
<script type="text/javascript">  
function getattributes()   
{  
    var oWindow = GetRadWindow();  
    alert(oWindow.newAttribute); // get the attributs.  
}  
function GetRadWindow()  
{  
  var oWindow = null;  
  if (window.radWindow)  
     oWindow = window.radWindow;  
  else if (window.frameElement.radWindow)  
     oWindow = window.frameElement.radWindow;  
  return oWindow;  
}    
</script> 

Thanks,
Princy.
0
Fiko
Telerik team
answered on 16 Mar 2009, 07:36 AM
Hi Taran,

The approach that Princy provides is the right one. You should just make sure to use the same name of the attribute.

All the best,
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.
Tags
Window
Asked by
Taran
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Fiko
Telerik team
Share this question
or