You are here: irt.org | BBS | Re: Resizing and optimizing windows with javascript [This BBS is closed]
Posted by ashley on September 15, 1998 at 07:55:43:
In Reply to: Resizing and optimizing windows with javascript posted by Helga Kristin on September 14, 1998 at 11:30:59:
: Is it possible to use javascript to resize a window and take
: out the and statusbars as it is loading? So it will display a
: window in a specific size without the status and navigation bar.
//###################################################
YES, here is a function that I always use to open a new browser
window from a button. Width and Height specifies the size of the
window and screenX and screenY specifies where to position the window. Set status to zero to turn off status bar, as well as other attributes that you want turned off.
Call the function in your html document.
function openHelp_BrowserPref (file) {
//####################################################
//PURPOSE: this function opens and loads the browser settings in a new browser window.
//PARAM: url or filename to load in the browser
//RETURN: none
//####################################################
var size_attrib = "width=750,height=500,screenX=30,screenY=5";
var other_attrib = "status=0,resizable=0,scrollbars=1";
winOpenSettings = window.open (file, "WindowOpenSettings", size_attrib+","+other_attrib);
winOpenSettings.creator=self;
winOpenSettings.focus ();
}
HTML document:
Your browser preferences must be set to the following
<a href="javascript:openHelp_BrowserPref ('hlpBrowserPref.html');"
onMouseOver="window.status='Open Browser Preference window.'; return true;"
onMouseOut ="window.status=''; return true;" >settings</a> or you will experience unusual display
results.
Follow-ups:
You are here: irt.org | BBS | Re: Resizing and optimizing windows with javascript [This BBS is closed]