Forum Moderators: open

Message Too Old, No Replies

remove menu on already open window

         

jackvull

1:58 pm on Jul 30, 2008 (gmt 0)

10+ Year Member



following code doesn't seem to remove the menubar?


<script language="JavaScript">
<!--
window.resizeTo(300,500);
window.document.body.scroll = 'auto'; // show only if needed
window.document.toolbar = 'no';
window.document.status = 'no';
window.document.menubar = 'no';
window.moveTo(screen.width/2-300,screen.height/2-250)
-->
</script>

Fotiman

5:20 pm on Jul 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Good. Code that removes the menubar is bad for usability and should never be employed.

jackvull

1:51 pm on Aug 4, 2008 (gmt 0)

10+ Year Member



In this case it should. I am opening a new window just to display some information. All I need to give the user access to do is close the page down again.
There will be no history on the new window so they cannot go back or forward, I don't see the harm.
I'm sure there is a way to do it with javascript?

Fotiman

3:41 pm on Aug 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




I am opening a new window just to display some information. All I need to give the user access to do is close the page down again.

*YOU* are not opening a new window... the user is. The information displayed is irrelevant. It's the user's browser window, so you should not try to control it. Maybe the user decides he/she wants to bookmark this information? Maybe the user sees something of interest in your information and wants to now Google for something similar using the same browser window? The point is, you should never assume that your user will want you to take control of their browser.

jackvull

4:05 pm on Aug 4, 2008 (gmt 0)

10+ Year Member



The user clicks a button, which opens a new window.
This is a web application for use within a company. Bookmarking the information would be futile as it is live information from a database, googling it would do no good either.

I appreciate what you are trying to say but I know what the requirements are for this and I am asking for a way to do it. There is no need for the menu bar, bookmarks, etc., just the close window and scroll bars.

Fotiman

5:48 pm on Aug 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



As I said, the information you are displaying is irrelevant. It's the user's browser window, and any application that attempts to control the user's browser is going against common best practices. You are taking away the user's choice. Does it benefit your page in any way to remove the toolbar? No. Could it harm the user experience? Yes.

Another example, what if the user wants to print the page?