Forum Moderators: open
<html>
<head>
<title></title>
<script type="text/javascript">
function fullScreen(theURL) {
window.open(theURL, '', 'fullscreen=yes, scrollbars=auto');
}
</script>
</head><body>
<a href="javascript:void(0);" onclick="fullScreen('http://www.webmasterworld.com');">Open Full Screen Window</a>
</body>
</html>
~ John
IE will open this completely fullscreen.
Opera 7.54 collasped my toolbars.
Opera 8.5 opened it as a normal link.
If there are other scripts that get various results across these and other browsers to get the link to work will require a moderately complex script beyond what I originally posted.
Anyone have anything to add with differing results?
<!--
function openFullScreen(url) {
//Check browser
var isNav = (navigator.appName == "Netscape")?1:0;
var isIE = (navigator.appName.indexOf("Microsoft")!= -1)?1:0;
//Check Platform
var isMac=(navigator.platform.indexOf("Mac")>-1)?1:0;
var isWin=(navigator.platform.indexOf("Win")>-1)?1:0;
//Set global window options
var opts =
"toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizeable=no
,copyhistory=no,menubar=no"
//Set platform and browser specific options
if (isNav)
{
//Navigator windows have outerWidth and outerHeight properties
//use these to set window size to the available screen height
and width
opts =
opts+",outerWidth="+screen.availWidth+",outerHeight="+screen.availHeight+",s
creenX=0,screenY=0";
}
else if (isIE) {
//IE has a "full-screen" option which can be used by placing
"fullscreen=yes" here
opts = opts+",left=0,top=0";
//To size the window (rather than open in fullscreen
mode) we need to know the padding
//i.e. the space taken by the title bar and window
edges. These values are subtracted
//from the available screen width and height (different
for Macs). If the new window
//is opened with toolbars, status bar, etc. the values
here should be changed to
//compensate for the new features.
if (isMac) {
//this uses a value of 13 for the extra width and 32
for the extra height
opts = opts+",width="+(screen.availWidth -
13)+",height="+(screen.availHeight - 32);
} else if (isWin) {
//this uses a value of 12 for the extra width and 25
for the extra height
opts = opts+",width="+(screen.availWidth -
12)+",height="+(screen.availHeight - 25);
} else {
opts =
opts+",width="+screen.availWidth+",height="+screen.availHeight;
}
} else {
return;
}
//Open a new window
var newWin = window.open(url,"NewWindow",opts);
newWin.focus();
//Move to 0,0 (JavaScript 1.2)
if (parseInt(navigator.appVersion) >= 4) {
newWin.moveTo(0,0);
}
}
// -->
1.) If someone posts something with something I know can be referenced in a search engine I use pieces of their code in a search engine in order to come up with additional ideas to suggest. Sometimes I'll spend an hour trying to figure a solution if I find something I feel I can figure out on my own and sometimes it takes me a quick online reference. Even when I am doing a bit of research I consistently reload the thread to see if anyone else has posted/made suggestions (especially if I'm stuck).
2.) When I post code I post a full working example (typically). Impartial examples (of course <html> and other obvious tags not included) will not really help your, my, or anyone's cause too much.
Anyway that big chunk of code is umm, just that.
Try not to think of the web as IE/Netscape anymore. That was really back in the days of Netscape 4. I vaguely remember Mozilla and Firefox sharing a script someplace that required detecting and doing slightly different things for both browsers to work correctly, a GUI issue maybe?
Anyway what you're trying to do is somewhat simple, just a little lengthy. The script you posted was legnthy but also complex.
Ok...you also REALLY need to clarify what you do and do not specifically want showing up.
Address bar? (Y/N)
Bookmarks? (Y/N)
Buttons? (Y/N)
Status Bar? (Y/N)
I think there are various controls for those so I'll try and do a little research. If you do your own research it will help you figure out how to maximize your ability to figure out how to find stuff you want online. Sometimes the answers aren't complete, but if you know enough you can take small pieces of the puzzle and create your own image/script/etc.
Oh -- looks like a good resource for what we're working on here...
[yourhtmlsource.com...]