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

Automatically Resize Parent Window

1 Answer 81 Views
Window
This is a migrated thread and some comments may be shown as answers.
Rahul
Top achievements
Rank 1
Rahul asked on 02 Jun 2009, 08:21 AM
Hello Sir / madam


             i have 2 form i m clicking on button open Radwindow with form in that radwindow one button it will open another Radwindow inside Radwindow ... but i want to automatically Resize the Parent window ? How to achieve ? Urgent !!!!!!!!!!!!!!!!!!!1


Thanks
Regards
Rahul M

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 02 Jun 2009, 10:04 AM
Hello Rahul,

You can resize the parent RadWindow by using the client side methods set_width() and set_height(). ASPX and JavaScript for parent radwindow is given below.

ASPX:
 
<input id="Button2" type="button" value="Resize and open window" onclick="resize();" /> 

JavaScript:
 
<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 resize() 
    var radwidow = GetRadWindow(); 
    var oBrowserWnd = GetRadWindow().BrowserWindow; 
    radwidow.set_width(800);  // Resize the window 
    radwidow.set_height(800); // Resize the window 
    radwidow.center(); 
    oBrowserWnd.radopen('http://www.google.com','null'); 
</script> 

Thanks,
Shinu.
Tags
Window
Asked by
Rahul
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or