[_] Safari javascript window opening question
Tim Brayshaw
tim at twisty.com
Wed Mar 16 18:30:38 GMT 2005
Hello [_]ers,
I'm trying to open a fixed size window in Safari via javascript, but the
window seems to be opening 2 pixels wider than I want. For instance the
following code opens a window with a content/inner-width of 402 pixels.
function test_1 ()
{
newWindow = window.open ('ruler.html', 'Ruler',
'width=400,height=200,scrollbars=no');
}
javascript:alert(newWindow.innerWidth) gives me 402!
It's not a big problem but the sort of annoying niggly thing that drives
me nuts. Has anyone encountered this? Any got any sane workarounds?
I've stuck a test-case here:
http://www.twisty.com/misc/tests/safari-window-size/opener.html
Tim.
I'm trying to open a fixed size window in Safari via javascript, but the
window seems to be opening 2 pixels wider than I want. For instance the
following code opens a window with a content/inner-width of 402 pixels.
function test_1 ()
{
newWindow = window.open ('ruler.html', 'Ruler',
'width=400,height=200,scrollbars=no');
}
javascript:alert(newWindow.innerWidth) gives me 402!
It's not a big problem but the sort of annoying niggly thing that drives
me nuts. Has anyone encountered this? Any got any sane workarounds?
I've stuck a test-case here:
http://www.twisty.com/misc/tests/safari-window-size/opener.html
Tim.