Click to See Complete Forum and Search --> : how to force maximize a window?


mcemond
12-17-2003, 01:45 PM
Hi I am building a site 800x600 with thumbnails. My employer wants the thumbnails, once clicked, to open a new maximized browser window. Am I just an idiot or is this really hard? I've been messing around with the following sort of stuff...

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>


<a href="javascript:;" onClick="MM_openBrWindow('../images/product_images/oneapp_04.gif','','')"> blah blah blah.gif</a>


Thanks for any help,
Mike

requestcode
12-17-2003, 02:38 PM
Maximized to what? The width and height of the window or the image itself?

mcemond
12-17-2003, 02:43 PM
Sorry, to the size of the monitor screen.

ccoder
12-17-2003, 03:09 PM
This is what I generally do:

function fullScreen() // custom property for window object
{
this.moveTo(0, 0);
this.resizeTo(screen.availWidth, screen.availHeight);

} // end of fullScreen

// assign custom property to window object
window.maximize = fullScreen;

Then call window.maximize in the ONLOAD.