Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

disable menubar, toolbar and location in browser

23 views
Skip to first unread message

tine...@hotmail.com

unread,
Jul 9, 2000, 3:00:00 AM7/9/00
to
Hello

I am working on an intranet application. To navigate inside the app, i
wrote a menu system in javascript that looks similar to the windows
menu system. Because i don't want the user to change the address, jump
backward and forward and do whatever he might try, i would like to
disable the menubar, toolbar and location when the user starts the app.

I know that i can create a new window with window.open and
parameters "location=0,menubar=0,toolbar=0", but i would like to alter
these settings in the current window (browser). Of course it would be
great to restore these settings again at the end of the app.

Is this possible in javascript ?

2nd question : If it's not possible, can i minimize the current window
(browser)in javascript before i create a new window ?

Thank you for you help


Sent via Deja.com http://www.deja.com/
Before you buy.

Elin Entchev

unread,
Jul 9, 2000, 3:00:00 AM7/9/00
to
Hi!

One way is to open a new window with the URL of the current one and close
the current one. This looks the same way as if you are changing/restoring
the settings of the current window. Just make sure you don't try it with the
main browser window because the user could cancel its closing. A sample code
follows:

<html>
<head>
<title>Test</title>
<script language="JavaScript" type="text/javascript"><!--
function hide() {
url1=location.href
open(url1,"_blank","location=0,menubar=0,toolbar=0")
close()
}

function show() {
url1=location.href
open(url1,"_blank","location=1,menubar=1,toolbar=1")
close()
}
// --></script>
</head>

<body>
<h1>Hello World!!! :-)</h1>
<a href="javascript:hide()">Click to Hide</a>
<a href="javascript:show()">Click to Restore</a>
</body>
</html>

Hope this helps!

Elin

<tine...@hotmail.com> wrote in message news:8k97v9$dsv$1...@nnrp1.deja.com...

0 new messages