View Full Version : Setting a window to a desired resolution
GyrFalcon
11-01-2002, 05:10 PM
Hi,
I am designing a page to load a window of a desired size(800*600) and i need a script that will do it..i also dont want the window to have any toolbars on it..I just want and 800*600 plain window..
Any1 know where i can find a script to do this for me?
oh the window will be activated by clicking on a link..
Thanx
GyrFalcon
PauletteB
11-01-2002, 05:53 PM
One way:
<a href="javascript:void(0)" onClick="window.open('yourpage.html','','left=0,top=0,width=800,height=600')">Open Window</a>
einbeiniger
11-01-2002, 06:38 PM
a nice possibility, how you can also choose the position of the window:
....................................................
<html><head>
<script language="JavaScript">
var undefined;
function popup(url, x, y, w, h) {
win = window.open(url, "_blank",
"menubar=no,toolbar=no,location=no,directories=no,status=no," +
"copyhistory=no,resizable=no,scrollbars=no," +
"ScreenX=" + x + ",left=" + x + "," +
"ScreenY=" + y + ",top=" + y + "," +
"width=" + w + "," +
"height=" + h);
win.focus();
return win;
}
</script>
</head><body>
<input type="button" name="Click" value="open popup"
onClick=popup("pop1.htm",200,400,800,600)>
</body></html>
.....................................................
just change the red parts:
the second red part contains:
the url of the popup, vertical poition, horizontal position.
like this, the popup is opened by clicking on a button, if you want a different code, just tell me (load automaticially, load after a certain time, load by onMouseOver)
Vladdy
11-01-2002, 06:47 PM
Originally posted by GyrFalcon
I am designing a page to load a window of a desired size(800*600) and i need a script that will do it..i also dont want the window to have any toolbars on it..I just want and 800*600 plain window..
Before you invest too much time in this design, please know that while fixed size design is a mere inconvinience for a user who has to scroll around, manipulations with a browser is a sure way to drive visitors away.
Usability first, your perseption of cool is last.
PauletteB
11-01-2002, 08:16 PM
einbeiniger
you can also choose the position of the window
In the one-line script as well...
<a href="javascript:void(0)" onClick="window.open('yourpage.html','','left=200,top=400,width=800,height=600')">Open Window</a>
GyrFalcon
11-02-2002, 01:18 AM
Thanx Guys
This should do exactly what i need..this page i am working on is based on a 800*600 template of an image..like a terminal screen there will be little scrolling content & it will actually be sized to fit 3 different browser sizes 640*480,800*600, & 1024*768 depending on the users screen resolution..i just used 800*600 as an example..
Thanx again
GyrFalcon:thumbsup:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.