How to disable a menu item in browser

Discussion in 'Javascript' started by Nemo, Aug 16, 2006.

  1. Nemo

    Nemo Guest

    Hello Guys,
    Can somebody tell me how I can disable a menu item such as "save as" in the
    Internet Explorer or Netscape using Javascript. Thanks.
    Nemo
    Nemo, Aug 16, 2006
    #1
    1. Advertising

  2. Nemo wrote:

    > Can somebody tell me how I can disable a menu item such as "save as" in
    > the Internet Explorer or Netscape using Javascript.


    You can't.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Aug 16, 2006
    #2
    1. Advertising

  3. Nemo

    Nemo Guest

    Then how they do that becasue I have seen this, is there another way or
    another script like VB?

    "David Dorward" <> wrote in message
    news:ec077s$4pu$1$...
    > Nemo wrote:
    >
    > > Can somebody tell me how I can disable a menu item such as "save as" in
    > > the Internet Explorer or Netscape using Javascript.

    >
    > You can't.
    >
    > --
    > David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    > Home is where the ~/.bashrc is
    Nemo, Aug 17, 2006
    #3
  4. Nemo

    RC Guest

    Nemo wrote:
    > Hello Guys,
    > Can somebody tell me how I can disable a menu item such as "save as" in the
    > Internet Explorer or Netscape using Javascript. Thanks.
    > Nemo
    >
    >


    No, you can't remove a menu item from a menu.
    But you can eliminate the all menu.
    Try

    window.open("yourFile.html", "targetNewWindow",
    "toolbar=no,location=0,directory=no,status=no,menubar=0,scrollbars=no,resizable=0,copyhistory=0,width=200,height=200");
    RC, Aug 17, 2006
    #4
  5. Nemo

    Randy Webb Guest

    RC said the following on 8/17/2006 8:53 AM:
    > Nemo wrote:
    >> Hello Guys,
    >> Can somebody tell me how I can disable a menu item such as "save as"
    >> in the
    >> Internet Explorer or Netscape using Javascript. Thanks.
    >> Nemo
    >>
    >>

    >
    > No, you can't remove a menu item from a menu.
    > But you can eliminate the all menu.
    > Try


    And then wonder why it doesn't remove the toolbars?

    > window.open("yourFile.html", "targetNewWindow",
    > "toolbar=no,location=0,directory=no,status=no,menubar=0,scrollbars=no,resizable=0,copyhistory=0,width=200,height=200");


    Control-N

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
    Randy Webb, Aug 17, 2006
    #5
  6. Nemo

    RC Guest

    Randy Webb wrote:

    >
    > And then wonder why it doesn't remove the toolbars?


    Then try

    "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=500,height=200"

    It works for me in FF, NS and IE.
    RC, Aug 17, 2006
    #6
  7. Nemo

    Randy Webb Guest

    RC said the following on 8/17/2006 9:55 AM:
    > Randy Webb wrote:
    >
    >>
    >> And then wonder why it doesn't remove the toolbars?

    >
    > Then try
    >
    > "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=500,height=200"
    >
    >
    > It works for me in FF, NS and IE.


    Try it in IE7.
    Try it in Opera.
    Try it in FF with the user.js file edited:

    user_pref("dom.disable_window_open_feature.toolbar", true);

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
    Randy Webb, Aug 17, 2006
    #7
  8. Nemo wrote:

    Please do not top post.

    > Then how they do that becasue I have seen this


    Where?


    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Aug 17, 2006
    #8
  9. Nemo

    Nemo Guest

    David,
    I'll try to find it, I have seen a webpage that when I tried to save using
    "Save as ...", the menu was disabled, I do not remember if they opened a new
    window.
    Regards

    "David Dorward" <> wrote in message
    news:ec2pr2$q0f$1$...
    > Nemo wrote:
    >
    > Please do not top post.
    >
    > > Then how they do that becasue I have seen this

    >
    > Where?
    >
    >
    > --
    > David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    > Home is where the ~/.bashrc is
    Nemo, Aug 18, 2006
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gino
    Replies:
    12
    Views:
    1,051
    Keith Wansbrough
    Sep 1, 2004
  2. Replies:
    0
    Views:
    1,435
  3. BlueFlash
    Replies:
    2
    Views:
    465
    John Ladasky
    Aug 26, 2009
  4. mwr

    ASP.Menu in IE6, cannot select menu item when...

    mwr, Jun 16, 2006, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    258
  5. hal

    disable menu items for the asp menu control

    hal, Sep 6, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    192
Loading...

Share This Page