Link to home
Start Free TrialLog in
Avatar of JoshinHtown
JoshinHtownFlag for United States of America

asked on

How do you Maximize a Web Page in HTML?

Hello-  I have a hyperlink on my web page that opens another web page when clicked.  When that hyper is clicked the correct web page opens but is not maximized by default.  What can I add to my HTML or javascript code to have that page open Maximized?

Thanks.
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

JoshinHtown,

HTML can't, it just opens the new window as the same size as the current one, but Javascript can help.  You would use window.open.  The "maximize" option is no longer well supported so you should specify a size too.  For example ...

<a href="#" onclick="window.open('http://thedomain.com/page.htm', 'windowName', 'height=600,width=800,fullscreen=yes');">Open window</a>

You can specify the URL, the window name (which is used by the script) and the features.

Let me know if you have any questions or need more information.

b0lsc0tt
Avatar of JoshinHtown

ASKER

Hello b0lscott-

I tried this code below for my hyperlink but nothing happens when I click it at runtime.  What am I missing?  Regards,

<area href="#" onclick="window.open('www.yahoo.com, 'Yahoo Site', 'height=600,width=800,fullscreen=yes');"></a>
ASKER CERTIFIED SOLUTION
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great. Thanks
Your welcome!  I'm glad I could help.  Thanks for the grade, the points and the fun question.

bol