...

View Full Version : Auto Resize



Merlin
08-21-2002, 06:31 AM
Is it possible to make it so that when you open a page, it will automatically resize itself to specied height and width?

I tried
function openWindow(){
window.close();
window.open(URL,"","width=300 height=600");
}
<body onLoad="openWindow()">

but for some reason, when i visit the page, it asks me if its ok to rezise the window. I really need to avoid that if possible.

Thanks.

x_goose_x
08-21-2002, 07:23 AM
What's with the close?

<script>
function openWindow(URL){
pop=window.open(URL,"","width=300 height=600");
}
</script>

</head>

<body onLoad="openWindow('http://www.google.com')">

You can also change it once loaded:

from popupsite:

window.resizeTo(300,600)

or from the first page:

pop.window.resizeTo(300,600)

Merlin
08-21-2002, 07:27 AM
hmm.. let me describe this better..... im trying to replace the window. So essentially what i want done is this.... The window to open, read my script, and finally resize itself WITHOUT scroll bars to the height and width i told it to. Can anyone help me??:confused:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum