View Full Version : Specific pop-up window size

07-12-2002, 04:46 PM
wow, this place sure has changed. There isn't even a link from dynamicdrive anymore it seems.

on to the main even.

i want to make a link, that when it says 'target="new"' it will open that 'new' window, but i want to determine the size of the window. and that's all. i'm not sure if it can be done without java, or with php. i'd really appreciate all help.

This place is always helpful, the only thing I don't like is when you ask a stupid question, you get mocked for it, but hey, let me have it.

07-12-2002, 05:09 PM
You can open a new window as follows (one method):

<a href="javascript&#58;;" onClick="window.open('yourPage.html','myWin','scrollbars=yes,width=500,height=500');">Open Window</a>

The bolded defines the size of the window. Change 'yourPage.html to the path to the html file you wish to open in the new window. For more information on pop-ups, here's a link youmight want to take a look at ;) .


07-12-2002, 05:12 PM
Like, thanks man.

07-12-2002, 05:24 PM
<A HREF="somePage.htm" TARGET="new" onClick="window.open('somePage.htm','new','width=##,height=##'); return false;">click click</A>

<edit>hmm. when i opened this thread there weren't any responses. i think i just experienced time loss there</edit>

07-12-2002, 05:27 PM
There are many variations, such having the window open onLoad. Here's a link to a pop-up generator we have at JavaScript Kit (though there are many such generators out there):


Edit: LOL joh6nn...the twilight thread :D.

07-12-2002, 05:32 PM
no, no, that is good. i didn't realize the other one was java script. i wanted to avoid java script.

Thank you!