Automatically Resize Parent Window

2 posts, 0 answers
  1. Rahul
    Rahul avatar
    142 posts
    Member since:
    May 2009

    Posted 02 Jun 2009 Link to this post

    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
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 02 Jun 2009 Link to this post

    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.
Back to Top