?
Solved

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

Posted on 1998-09-18
6
Medium Priority
?
5,411 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 200 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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

770 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