Log in

View Full Version : maximizing target window size



gib65
10-16-2009, 04:19 PM
Hello,

Please go to http://www.cactusridgerr.com/choices.htm. Click on the 'enlarge' button. Your browser may be setup to maximizing the size of the new window that pops up, but I'd like to know if there's a way to force the size of the window to be maximized - otherwise, the image doesn't look all that enlarged.

My code for the 'enlarge' button looks like this:



<td>
<a id="aenlarge" href="print/freisa.jpg"
onmouseover="ienlarge.src='JPGs/enlarge_highlighted.jpg'"
onmouseout="ienlarge.src='JPGs/enlarge_normal.jpg'" target=_blank>
<img id="ienlarge" src="JPGs/enlarge_normal.jpg" border=0></a>
</td>


As you can see, it links to a simple JPG and the target=_blank attribute in the link tag ensures that it will open in a new window. Is there anything I can add to the link tag that will force a maximization of the size of the new window? Something like like onclick="target.window.size=max;"?

Thanks for any forthcoming help.

bluewalrus
10-16-2009, 10:44 PM
<SCRIPT type="text/javascript">
function Maximize()
{
window.innerWidth = screen.width;
window.innerHeight = screen.height;
window.screenX = 0;
window.screenY = 0;
alwaysLowered = false;
}
</SCRIPT>


<a href="javascript:onClick=Maximize()">Maximize</a>


This is will maximize the current window to the viewing area. From htmlgoodies. I think you could use this with an onload and window.open to get what you want.