Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Resize new IE Browser window.........

    Code:
    function NewBrowser2(url, name, h, w, l) {
    
                 string = 'top=0, left=' + l
    	newwindow = window.open(url, name, string);
    		
    		
    
    	if (window.focus){
    	newwindow.focus()
    	newwindow.resizeTo(h, w);
    	}
    		
    }
    There is my code. It works upto a point, it opens a new window, focuses on that window, but the "newwindow.resizeTo(h, w);" doesn't work.

    Any Ideas?

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Why not just use the window.open function to do it all?
    Code:
    function NewBrowser2(url, thename, h, w, l) {
    	newwindow = window.open(url, thename, 'width='+w+',height='+h+',top=0,left='+l+');
            if(newwindow) newwindow.focus();
    }
    I changed your name variable to something else because name might cause some problems if you form elements on the same page.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Aug 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well what I am trying to do is a bit of a hack.

    I want to get rid of the titlebar, with the close(x) button. But the only way I can think of doing it is by doing the: newwindow = window.open with a fullscreen=yes property, which will remove the titlebar and (x) and then resize that window so it will allow another browser window to be seen.

    I promise there is a good reason for it :-)

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You can't resize a window that has gone fullscreen. The fullscreen overrides any sizing of it.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •