Aaron said:
"Andre" [...] wrote [...]
I have this code, and he's working for about 2 years now. With a
recent computer change, he stop to work (with IE6). Now i always
have the titlebar and statusbar.
window.open(theURL, 'Page',
'screenx=0,screeny=0,toolbar=0,menubar=0,status=0,scrollbars=0,resizable=0,top=0,left=0,fullscreen=1');
I want a fullscreen page with no bar.. anything, just the page...
forcing me to use ALT-F$ to close the page..
Did someone have any idea ?
Try this it works for me :-
For appropriate values of "works".
~~~~~~~~ FullScreen.html ~~~~~~~~~~~
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
The system identifier is missing, triggering Quirks/Compatibility Mode.
The `title' element is missing for Valid HTML 4.01 Transitional.
One should be able to write Valid HTML before attempting to write
any Web-based script code.
<body>
<script type="text/javascript">
<!--
^^^^
Anyone with a minimum clue would have stopped using this always-nonsensical,
long-since-obsolete technique by now, being discussed and recommended
against here ad nauseam now.
It is not a constructor, and it is not intended to be used as such,
so the identifier should not start with a capital letter. Code style.
{
window.open(
"FullScreenWindow.html",
null,
`null' (the null, empty, or non-existent object reference) is not allowed
as second argument, which you would have known had you ever consulted any
reference material. A string value is expected here. `null' is maybe
converted to the string "null", but one should not rely on that. A window
named "null" would not make much sense anyway.
<URL:
http://research.nihonsoft.org/javascript/ClientReferenceJS13/window.html#1202731>
<URL:
http://developer.mozilla.org/en/docs/DOM:window.open#Return_value_and_parameters>
"scrollbars=no,channelmode=yes,fullscreen=yes,titlebar=no"
The OP's request was to remove title bar _and_ status bar. Either
statusbar=0 is the default, then using it as the OP already wrote did not
change anything; or it is not the default, then statusbar=0 obviously did
not work with the OP.
The reason is of course the usability improvements for IE 6 coming with
Windows XP Service Pack 2 (note that the OP wrote about "a recent computer
change"). Fortunately for users, script authors cannot work around them.
I seriously doubt there is any point in using this method.
See above.
The required `action' attribute is missing.
<input type="button" name="Open" value="Open" onClick="DoOpen();">
</form>
The button is not functional without client-side script support, therefore
it should probably be generated by a client-side script. Furthermore, the
`form' element is unnecessary here, especially with HTML 4.01 Transitional,
and the `name' attribute is unnecessary, too.
document.write(' said:
[...]
~~~~~~~~~~~~~~~~~~~ FullScreenWindow.html ~~~~~~~~~~~~~~~~~~~
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript">
<!--
See above.
function Keypress()
{
this.close("yes");
`this' in this method, if called as below, refers to the Global Object.
It is error-prone to infer that the Global Object has host-defined
properties that Window objects have. Use window.close() instead.
That said, Window::close() never took any arguments.
<URL:
http://research.nihonsoft.org/javascript/ClientReferenceJS13/window.html#1201822>
<URL:
http://developer.mozilla.org/en/docs/DOM:window.close>
See above.
Not Valid, the `title' element is missing again.
<body onkeypress="Keypress();">
So *any* keypress closes the window, even a Ctrl+F or F5. However, the OP's
request included that only "ALT+F$" (probably "ALT+F4" was meant) should
close the window.
[...]
Report back if it works or does not work still please report back.
YMMD.
PointedEars