| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 63914 | 2005-11-26 16:58:00 | Auto Sizing Popup Windows | Adam678 (6880) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 407984 | 2005-11-26 16:58:00 | Hello! 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. Cheers! :D |
Adam678 (6880) | ||
| 407985 | 2005-11-26 20:18:00 | Put this javascript code into your popup page: <script> function resizing() { self.resizeTo(400,600) } </script> Change the 400 and 600 to suit your webpage. Cheers :) |
Renmoo (66) | ||
| 407986 | 2005-11-26 20:45:00 | Sorry, and add this line as well to execute the function: <script>resizing()</script> Cheers :) |
Renmoo (66) | ||
| 407987 | 2005-11-27 14:02:00 | Thanks | Adam678 (6880) | ||
| 1 | |||||