Results 1 to 2 of 2

Thread: maximizing target window size

  1. #1
    Join Date
    Jun 2008
    Posts
    192
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default maximizing target window size

    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:

    Code:
    <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.

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Code:
    <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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •