View Full Version : Auto Sizing Popup Windows

27-11-2005, 04:58 AM

Is it possible to autoresize a popup window to match the dimensions of the content being displayed? On a website of mine I have a list of games, and when you click on a game I want a popup window to....well popup! But I want the window automatically be the same size as the content it is displaying (it will be displaying a .swf file). I have tried setting the width and height to 100% and that does not work, I have also tried setting W and H to "auto", that too does not work, is there like a JavaScript code that will do it?

BTW I have noticed that in Firefox if you don't set a H and W it automatically resizes to fit the content but in IE it does not.


27-11-2005, 08:18 AM
Put this javascript code into your popup page:

function resizing() {

Change the 400 and 600 to suit your webpage.

Cheers :)

27-11-2005, 08:45 AM
Sorry, and add this line as well to execute the function:


Cheers :)

28-11-2005, 02:02 AM