View Full Version : size of window
Elaborate
04-23-2003, 02:26 AM
how would i keep the size of the window at a certiain size to fit a smaller webpage? 586 is the height i wanted and the width can be like 600 i guess or maby less, but yea i just need to know how to do this thnaks
requestcode
04-23-2003, 03:49 AM
It would be done using JavaScript. Is the window one that is opened using the javascript window.open(...) method or is is the main browser window? If it is the main browser window then you could try this in the head section of your document:
<script language="javascript">
window.resizeTo(600,586)
</script>
I believe that is the correct format. If you are using the window.open() method then you can set it when opening the window like this:
newWin=window.open("mypage.html","mywin",config="width=600,height=586")
driftwood
04-23-2003, 04:15 PM
The information you gave enabled me to set the opening size of the browser window. Is there someway to lock it to this size, so it can't be changed after it is opened. I have a javascript referencing absolute x,y coordinates, and want to make sure it stays where I need it to be.
Elaborate
04-24-2003, 01:03 AM
i want to know this too if anyone can tell us...thanks
Weirdan
04-24-2003, 09:32 AM
IE version:
newWin=window.open("mypage.html","mywin",config="width=600,height=586,resizable=no");
driftwood
04-24-2003, 02:32 PM
I'm sorry. I didn't specify that the problem is with the original browser window opening. To set the parameters in a new window is no problem. I just can't lock the original browser window to a specified size.
ronaldb66
04-24-2003, 02:47 PM
Trying to control how a user displays a browser window is a very bad approach, anyway; it's the user's browser and the user's window, and you'll just have to be content with what he / she offers you spacewise.
If your design requires a certain fixed size window, your probably approach it the wrong way.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.