Log in

View Full Version : sizing a popup windows



hallaow
08-30-2006, 02:53 PM
Hi everyone.

Can someone tell me how to change the attribute of a popup so it only shows at a certain size and removes nav buttons and such.

Cheers
al

jscheuer1
08-31-2006, 08:08 AM
Can't be done using HTML. I can sort of be done with javascript (if enabled in the user's browser) except that depending upon the browser and how it is configured, pop ups may not be allowed at all and, if allowed, may be severely limited as far as how much control the site designer (you, in this case) can impose upon them.

That being said, here is a fairly reliable javascript method for opening up a controlled pop up:


<a href="some.htm" onclick="window.open(this.href,'','width=300, height=300');return false;" target="_blank">Link Text</a>

The pop up this opens will have the least amount of 'nav buttons and such' allowed by the browser. If javascript is disabled, a normal 'new window' would open, at least in most browsers. If pop ups are severely restricted by the browser's configuration, there will probably only be a notice that a pop up was blocked, perhaps not even that.