PDA

View Full Version : new browser window - specific size



ERSpangler
21 Apr 2006, 08:39 PM
Hello,

I'm aware of how to make a link open in a new brower window, but I want that new window to be much smaller, say 400x400 or something. I've seen it done and should have peeked at the code then, but now I don't remember where it was. :(

Any ideas?

Erin

Wickham
22 Apr 2006, 02:52 AM
Click on the middle button top right of the screen, between the - and x; then put the mouse on the edge of the window and drag it smaller, both side and bottom.

I don't know how to make it EXACTLY 400 x 400; I just judge it by eye comparing it as a proportion of my 1024 x 768 screen resolution.

I would be interested to know if there is a way of measuring the new window accurately.

If you want to control someone else's browser window when they open your page use the code from http://www.codeave.com/javascript/code.asp?u_log=7065
Put this in the <head>:-

<script language="JavaScript">
<!--
// This will resize the window when it is opened or
// refresh/reload is clicked to a width and height of 400 x 400
// width is placed first, height is placed second
window.resizeTo(400,400)
-->
</script>

(Just tried it with one of my pages).