Click to See Complete Forum and Search --> : html - how to make a new window load to a specific size


amackie
09-19-2003, 08:26 PM
I've had no luck searching the web, but I admit I have add, and the intelligence of a 3 year old, so it's probably just me.

I'm trying to make it so certain pages...i.e. the links page will open to a certain window size, say 500x500, some will still need scroll bars, so I'm not sure if that's an issue as well.

is there a thing I need to add to the <a href=> portion, or do I need a script instead of going the html route?

thanks
Alden

qwe
09-20-2003, 01:42 PM
you call window.open using javascript like this:

var new_window =
window.open("/links.html","width=400,height=400");

the entire link would look like:

<a href="#" onClick="var new_window =
window.open("/links.html","width=400,height=400"); return false;">THE NAME OF THE LINK</a>

yo uhave to have href="#" and the return false in order to prevent your original window from changing.

amackie
09-21-2003, 07:17 AM
ok cool, thanks man :)