Solved

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

Posted on 1998-09-18
6
5,403 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
[X]
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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
Help with mod_substitute 18 75
Sending ASP to server side 8 42
CSS Scroll Center with Static Side. Like EE does. 2 46
SSL unsecure page mystery 17 43
This article discusses how to create an extensible mechanism for linked drop downs.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
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 …

737 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