Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you resize an IE browser window to 1024 x 768

In Firefox you can enter the following into the awesome bar and hit enter:

javascript:self.resizeTo(1024,768);

How do you do the same thing in IE?

like image 743
Omar Shahine Avatar asked Sep 12 '08 21:09

Omar Shahine


3 Answers

javascript:resizeTo(1024,768);
vbscript:resizeto(1024,768)

Will work in IE7, But consider using something like

javascript:moveTo(0,0);resizeTo(1024,768);

because IE7 doesn't allow the window to "resize" beyond the screen borders. If you work on a 1024,768 desktop, this is what happens...

  • Firefox: 1024x768 Window, going behind the taskbar. If you drop the moveTo part, the top left corner of the window won't change position.(You still get a 1024x768 window)
  • IE7: As close as possible to the requested size without obscuring the taskbar or allowing any part of the window to lie beyond the screen borders.
  • safari: As close as possible to the requested size without obscuring the taskbar or allowing any part of the window to lie beyond the screen borders, but you can ommit the moveTo part. Safari will move the top left corner of the window for you.
  • Opera: Nothing happens.
  • Chrome: Nothing happens.
like image 126
Tolle Avatar answered Oct 04 '22 01:10

Tolle


Maybe not directly related if you were looking for only a JavaScript solution but you can use the free Windows utility Sizer to automatically resize any (browser) window to a predefined size like 800x600, 1024,768, etc.

enter image description here

like image 45
huseyint Avatar answered Oct 04 '22 01:10

huseyint


Your code works in IE, you just need to "Allow blocked Content" in the Security Toolbar

http://i38.tinypic.com/20uahkl.jpg

like image 38
roman m Avatar answered Oct 04 '22 00:10

roman m