PDA

View Full Version : resizing new pages


canuckin
10-16-2002, 09:22 PM
Hello, Does anyone out there know how to, if possible, put a code in a page the will change the size of that page upon it's creation?
example: jonny presses on a link with a _blank and a new page pops up, but that page has a code which forces it's size to 300x200.

thanks for any help :)

beetle
10-16-2002, 09:29 PM
Uhh...couple ways...

window.open('page.htm','_blank','width=300, height=200, scrollbars=yes, location=yes, status=yes, titlebar=yes, toolbar=yes, menubar=yes, resizable=yes');

If you don't want any of the features to be on the new window...just remove their reference above..

2nd way

var myWin = window.open('page.htm','_blank');
myWin.resizeTo(300,200);

canuckin
10-16-2002, 10:27 PM
oh, yes I know these methods but what I'm trying to do is If I'm on news.htm and I click on a link to article1.htm i would like there to be a bit of code on article1.htm that adjusts the size, not there be a bit of code on news.htm

canuckin

joh6nn
10-16-2002, 10:30 PM
window.resizeTo(width, height);

beetle mentioned it too, but i can see where you might have been confused by it.

canuckin
10-16-2002, 10:42 PM
oh right! thanks for the help joh6nn and beetle

:)

- canuckin