Forum Moderators: open

Message Too Old, No Replies

How do you maximize a window with javascript?

         

smithaa02

8:52 pm on Jun 5, 2006 (gmt 0)

10+ Year Member



I want to use target=_blank on for a link, but am worried that the user might have had their last targetted window open be not fullsized, in which case the window they open for my link will not be fullsized.

Is there a script I can put in the target page that will ensure it will be maximized?

smithaa02

9:10 pm on Jun 5, 2006 (gmt 0)

10+ Year Member



If anybody else is curious about a solution, I think I found it:

<SCRIPT language="JavaScript">
<!--
window.moveTo (0, 0);
if (document.layers) // navigator 4+
{ var deltaX = screen.availWidth - window.outerWidth;
var deltaY = screen.availHeight - window.outerHeight;
window.resizeBy (deltaX, deltaY);
} else if (document.all) // exploder 4+
{ resizeTo(screen.availWidth,screen.availHeight); }
-->
</SCRIPT>