Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

IE 4 - Target=blank force browser to open full screen

Posted on 1998-09-18
6
5,395 Views
Last Modified: 2008-03-03
When targeting a new window with the following:
<A href="page.htm" target="_blank">Click here</a>

Is there a way to force the browser to open maximized>
0
Comment
Question by:dejthor
  • 3
  • 2
6 Comments
 
LVL 12

Expert Comment

by:Otta
ID: 1837937
It can be done, if the user's browser supports JavaScript,
and the user has not disabled JavaScript.
0
 
LVL 8

Accepted Solution

by:
jbirk earned 50 total points
ID: 1837938
Yes, with Javascript you would use something like this:
<A href="javascript:void(0); onClick="window.open('page.htm','new_win','fullscreen,status,buttons,location');" >Click here</a>
That will open it into fullscreen mode and will only do this for IE 4.  If you want it to be maximized you can't truly 'maximize' it but you can make it's size the size of the screen, assuming that the user has netscape 4+ or IE 4+.  That would look something like this:
<A href="javascript:void(0); onClick="max_open();">Click here</a>
<SCRIPT language="JavaScript1.2">
<!-- cloak
x=screen.width;
if (x<=640) //640X480 screen
 window.open('page.htm','new_win',width=640,height=480,status,buttons,location');
else if (x<=800) //800X600 screen
 window.open('page.htm','new_win',width=800,height=600,status,buttons,location');
else if (x<=1024) //1024X768 screen
 window.open('page.htm','new_win',width=1024,height=768,status,buttons,location');
//and any other resolutions I missed??
// decloak -->
</SCRIPT>


Hope this is helpful,
Josh
0
 
LVL 1

Author Comment

by:dejthor
ID: 1837939
When using the following:
<A href="javascript:void(0); onClick="window.open('page.htm','new_win','fullscreen,status,buttons,location');"

Two undesired results. First, while in full screen mode, there are no toolbars. Second, the frame that contains the href canges from a list hyperlinks to [object].

0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 8

Expert Comment

by:jbirk
ID: 1837940
OK, well the second problem was a simple caused because I missed a quote.  It should be:
<A href="javascript:void(0);" onClick="window.open('fullscreen.html','new_win','fullscreen,status,toolbar,location');">New fullscreen window</A>
Notice the quote after javascript:void(0);

The first problem I can't do anything about because apparently IE's fullscreen mode overrides any other requests for window features.  So basically there's nothing you can do about it if you want fullscreen mode.

You can always use something like this which will increase the window to the size of the screen and move it to starting in the upper left: (4+ browsers only)
<A HREF="javascript: if (window.resizeTo) window.resizeTo(screen.availWidth,screen.availHeight); if (window.moveTo) window.moveTo(0,0);">Fullscreen me</A>
That basically maximizes the current window. and doing this:
<BR><A href="javascript:void(0);" onClick="new_win=window.open('fullscreen.html','new_win','status,toolbar,resizable,location,scrollbars'); if (window.resizeTo) new_win.resizeTo(screen.availWidth,screen.availHeight); if (window.moveTo) new_win.moveTo(0,0);">new fullscreen window</A>
would open a new maximized window.

Note that the above two methods work like a charm in IE 4, but not quite as well N 4.  In netscape, it makes the window bigger than the available space, even though that is what we told it to use.

-Josh
0
 
LVL 1

Author Comment

by:dejthor
ID: 1837941
OK using the following:
<A href="javascript:void(0);" onclick="window.open('../rosters/rosterall.htm','new_win','status,toolbar,resizable,location,scrollbars'); if (window.resizeTo) new_win.resizeTo(screen.availWidth,screen.availHeight); if (window.moveTo) new_win.moveTo(0,0)" onmouseover=rollon(); onmouseout=rolloff(); border = 0><SPAN class =Item>All Teams</SPAN></A>

Generates an error: new_win is undefined.
0
 
LVL 8

Expert Comment

by:jbirk
ID: 1837942
You missed some of it in your copy paste.  Look above, I posted this:
<BR><A href="javascript:void(0);"
onClick="new_win=window.open('fullscreen.html','new_win','status,toolbar,resizable,location,scrollbars'); if (window.resizeTo) new_win.resizeTo(screen.availWidth,screen.availHeight); if (window.moveTo) new_win.moveTo(0,0);">new fullscreen window</A>

You left out the part that defines new_win at the beginning of the onClick action
("new_win=window.open....)

-Josh
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question