Results 1 to 7 of 7

Thread: [RESOLVED] howto: Hide pop-up menu

  1. #1

    Thread Starter
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Resolved [RESOLVED] howto: Hide pop-up menu

    I was just wondering. some sites disable the right-click popup menu.

    How can I do this in my pages?
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: howto: Hide pop-up menu

    You need to use a click handler (event listener?) in Javascript.

    BUT, first I suggest you read this quote
    Quote Originally Posted by [url]http://javascript.about.com/library/blnoright.htm[/url]
    Web novices often believe that by blocking their visitors use of the right mouse button that they can prevent the theft of their web page content. Nothing could be further from the truth as there are so many ways to bypass the "no right click script" that the only effects that such a script has is to annoy those of your visitors who legitimately use the context menu (as that menu is properly called) in their web navigation.

  3. #3

    Thread Starter
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: howto: Hide pop-up menu

    Quote Originally Posted by penagate
    You need to use a click handler (event listener?) in Javascript.

    BUT, first I suggest you read this quote
    "Don't worry I'm using it for localhost".
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  4. #4

    Thread Starter
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: howto: Hide pop-up menu

    I've noticed something strange:
    If I remove the semi-colon ';'
    Right click is disabled in IE and allowed in FF
    else
    Right click is disabled for both
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: howto: Hide pop-up menu

    Yup. IE uses JScript, Firefox uses Javascript. Both are very similar but in JScript semi-colons are optional. Statement endings are "inferred". In Javascript semicolons are not optional. So that's the difference.

  6. #6
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: howto: Hide pop-up menu

    But a good programming is to always add it, just like with indentation even if that is not required either...


    - ØØ -

  7. #7

    Thread Starter
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: howto: Hide pop-up menu

    I didn't know there is a difference between JScript and JavaScript
    I'll look these stuff up
    Thanks
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width