Customize RightClick Menu

Discussion in 'Javascript' started by rishabhshrivastava@gmail.com, Sep 5, 2006.

  1. Guest

    Hi All,
    I am using a Web Application and I want to customize Right Click Menu
    as following:-

    Do Nothing when user does a Right Click.

    When user select some text and does a Right Click he/she should have a
    option of Copy and Paste.

    Any Ideas how can this be done.

    Thanks
     
    , Sep 5, 2006
    #1
    1. Advertising

  2. *** escribió/wrote (5 Sep 2006 10:23:09
    -0700):
    > I am using a Web Application and I want to customize Right Click Menu
    > as following:-
    >
    > Do Nothing when user does a Right Click.
    >
    > When user select some text and does a Right Click he/she should have a
    > option of Copy and Paste.
    >
    > Any Ideas how can this be done.


    We might be able to provide better advise if you tell us why you need this
    and what you're trying to accomplish. I hope you aren't trying to protect
    your source code...

    BTW, Mozilla Firefox has a security feature to explicitly avoid what you're
    trying to do.



    --
    -+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
    ++ Mi sitio sobre programación web: http://bits.demogracia.com
    +- Mi web de humor con rayos UVA: http://www.demogracia.com
    --
     
    Alvaro G. Vicario, Sep 5, 2006
    #2
    1. Advertising

  3. Randy Webb Guest

    Alvaro G. Vicario said the following on 9/5/2006 6:08 PM:
    > *** escribió/wrote (5 Sep 2006 10:23:09
    > -0700):
    >> I am using a Web Application and I want to customize Right Click Menu
    >> as following:-
    >>
    >> Do Nothing when user does a Right Click.
    >>
    >> When user select some text and does a Right Click he/she should have a
    >> option of Copy and Paste.
    >>
    >> Any Ideas how can this be done.

    >
    > We might be able to provide better advise if you tell us why you need this
    > and what you're trying to accomplish. I hope you aren't trying to protect
    > your source code...
    >
    > BTW, Mozilla Firefox has a security feature to explicitly avoid what you're
    > trying to do.


    And Opera doesn't allow it at all.

    Want a customized Right Click Menu that is dependable on the Web? Write
    your own browser.

    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
     
    Randy Webb, Sep 6, 2006
    #3
  4. Guest

    Hi Alvaro,
    I am trying to protect my Source code but thats not my main
    concern.....I also dont want user to Browse Back and Forward using
    RightClick Menu.

    I just want them to have Options of RightClick Menu which is generated
    when we select/highlight a text on a webpage which are Undo, Copy,
    Paste, Cut , Delet, Select All etc.

    I hope this further expalins what I am trying to do.

    Thanks
     
    , Sep 6, 2006
    #4
  5. Guest

    Hi Randy,
    Thanks for your Advice...I will let you know once I get around with
    what I am trying to achieve. Unfortunately this is the first project I
    am dealing with lots of client side scripting so my knowledge is
    limited.

    Thanks all you folks out there for your suggestions.
     
    , Sep 6, 2006
    #5
  6. Evertjan. Guest

    wrote on 06 sep 2006 in comp.lang.javascript:

    > Hi Alvaro,
    > I am trying to protect my Source code but thats not my main
    > concern.....I also dont want user to Browse Back and Forward using
    > RightClick Menu.
    >
    > I just want them to have Options of RightClick Menu which is generated
    > when we select/highlight a text on a webpage which are Undo, Copy,
    > Paste, Cut , Delet, Select All etc.
    >
    > I hope this further expalins what I am trying to do.
    >


    [please always quote what you are replying to,
    this is not email but usenet,
    and so we do not know what it is that it would expalin
    what you are trying to do further.]

    No, you don't own my browser, so preventing me to use it to the full
    extent is an insult and I would, found that, opt not to return to your
    site anymore, which could harm your business.

    > ... Browse Back and Forward ...


    This is easly done by the BS or alt-leftarrow and alt-rightarrow key
    combinations, or the relevant browser icons or menu.

    I doubt that many ordinary surfers even know or have ever used the back
    function in the rightclick menu.

    Yes, some page sequences, like in form submission are compromized when
    executing a pageback, however, you should be able to detect that and
    prevent the unwanted consequences with your [preferably serversided IMHO]
    code.

    > ... I am trying to protect my Source code ...


    You cannot protect it but from the coding ignorant,
    who would not understand it or have use for it anyway.
    If you don't know that now,
    your code surely is not innovative enough to be protected.

    Since hopefully you have learned al lot of clientside coding by
    viewsource viewing otherman's code, don't you feel a slight obligation to
    give others the ability to viewsource view your selfprofessed as
    important code?

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Sep 6, 2006
    #6
    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. Bill Smarty
    Replies:
    0
    Views:
    518
    Bill Smarty
    Jan 13, 2004
  2. Ken Yu
    Replies:
    8
    Views:
    672
    Justin Beckwith
    Nov 2, 2004
  3. cirfu

    rightclick-copy in IDLE?

    cirfu, Jun 22, 2008, in forum: Python
    Replies:
    1
    Views:
    237
  4. Steven Choo
    Replies:
    12
    Views:
    213
    Randy Webb
    Jan 18, 2004
  5. Napoleon
    Replies:
    2
    Views:
    118
    Napoleon
    Nov 21, 2007
Loading...

Share This Page