javascript to disable the title bar, status bar, and address bar of a window

M

Matt

I want to disable the title bar, status bar and address bar of a
window, but I couldn't find the syntax. I tried the following but not
working. any ideas??

window.document.statusbar.enable = false;
window.document.titlebar.enable = false;
window.document.addressbar.enable = false;

<html>
<title>hey</title>
<script type="text/javascript">
function changetitle()
{
alert(window.document.title);
window.document.title = "heyhey";
window.document.statusbar.enable = false;
alert(window.document.title);
}
</script>
<body onload="changetitle()">
</body>
</html>
 
R

Randy Webb

Matt said:
I want to disable the title bar, status bar and address bar of a
window, but I couldn't find the syntax. I tried the following but not
working. any ideas??

Yes. Stop trying to hide something JS has no control over (unless it
opens a new window).
 
T

Thomas 'PointedEars' Lahn

Matt said:
I want to disable the title bar, status bar and address bar of a
window, but I couldn't find the syntax. I tried the following but not
working. any ideas??

window.document.statusbar.enable = false;
window.document.titlebar.enable = false;
window.document.addressbar.enable = false;

Remove ".document" and replace "enable" with "visible" to make it work
in Netscape 6.x (IIRC) and some Mozilla/5.0 nightly builds. Except of
the title bar, which only the window manager has control over.
"addressbar" must be "locationbar" then. Using signed scripts you may
request the UniversalBrowserWrite privilege to modify the properties in
recent Mozilla/5.0, too.


PointedEars
 
L

Lee

Matt said:
so do you know some workarounds to my problem? thanks

You haven't told us what the problem is.
You've asked how to do some things that you shouldn't be trying to do.
What problem are you trying to solve?
 
G

George Hester

Thomas 'PointedEars' Lahn said:
Remove ".document" and replace "enable" with "visible" to make it work
in Netscape 6.x (IIRC) and some Mozilla/5.0 nightly builds. Except of
the title bar, which only the window manager has control over.
"addressbar" must be "locationbar" then. Using signed scripts you may
request the UniversalBrowserWrite privilege to modify the properties in
recent Mozilla/5.0, too.


PointedEars

It's always a pleasure to read a response which answers the question. Even if
it is not exhaustive. It's much better then, "don't."

GH
 
T

Thomas 'PointedEars' Lahn

George said:

Please do not write so-called "attribution novels". The name of the
precursor's author is sufficient to follow the discussion. The e-mail
address in the From header is often of little use as it is used as a
spam(mer) trap (could be a tarpit and the like; as opposed to one in
the Reply-To header). The message ID of the precursor is contained in
the References header of the followup. Two or more lines interfere
with flow of reading, especially with several quotation levels.
Remove ".document" and replace "enable" with "visible" to make it work
in Netscape 6.x (IIRC) and some Mozilla/5.0 nightly builds. Except of
the title bar, which only the window manager has control over.
"addressbar" must be "locationbar" then. Using signed scripts you may
request the UniversalBrowserWrite privilege to modify the properties in
recent Mozilla/5.0, too.
[...]

It's always a pleasure to read a response which answers the question.
Even if it is not exhaustive. It's much better then, "don't."

Actually, if you read it thoroughly, it *was* a "don't" :)


PointedEars

P.S.: Please trim your quotes (to the parts you are referring to).
 
M

Matt

Thomas 'PointedEars' Lahn said:
Remove ".document" and replace "enable" with "visible" to make it work
in Netscape 6.x (IIRC) and some Mozilla/5.0 nightly builds. Except of
the title bar, which only the window manager has control over.
"addressbar" must be "locationbar" then. Using signed scripts you may
request the UniversalBrowserWrite privilege to modify the properties in
recent Mozilla/5.0, too.

Unfortunately, I only want to make it work in IE, not Netscape. I
tried the following but it didn't work in IE.

window.statusbar.visible = false;
 
T

Thomas 'PointedEars' Lahn

Matt said:

Please do not write attribution novels.
Remove ".document" and replace "enable" with "visible" to make it work ^^^^^^^^^^^^^^^
in Netscape 6.x (IIRC) and some Mozilla/5.0 nightly builds. [...]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Unfortunately, I only want to make it work in IE, not Netscape. I
tried the following but it didn't work in IE.

window.statusbar.visible = false;

Since you appear to have problems with reading, I have marked what is
important here.


PointedEars
 
K

kaeli

Unfortunately, I only want to make it work in IE, not Netscape. I
tried the following but it didn't work in IE.

If this is for an intranet application, CD app, or something else you know
your users for, use an HTA. (html application)
IE / Windows only.
This gives you MUCH more control over the interface. It is not suitable for
internet use, however.

HTH

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top