Question

I am having this weird issue with window.open in IE. It creates new window with extra width & height than I had specified.

popped_window = window.open('http://localhost/window/window-width.php','_blank','width=800,height=600,scrollbars=no')

The code above opens a IE window with 804px and 604px (innerWidth, innnerWidth). Outer Height differs with features I have selected (address bar, status bar etc.). Its natural but why the inner dimensions has to change by 4px.

Somewhere it was written that this additional 4px on both dimensions are for scrollbars. IE puts it to make sure that width remains same if the content on the window adds up the scroll bar or not. I don't have MSDN article to prove it, since I saw that in some forum.

Also this behavior of 4px addition doesn't show up if new window opened has on its content. This is the real trouble maker as frameset may appear/dissapear dynamically on the new window.

I already tried window.resizeTo(), which didn't help at all. Nothing I could find on stackoverflow. So any Suggestions?

Was it helpful?

Solution

This occured in Standard Mode, I shifted to Quirks and its working for now.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top