|
-
Feb 23rd, 2006, 06:31 PM
#1
Thread Starter
Arabic Poster
[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
-
Feb 24th, 2006, 12:03 AM
#2
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
 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.
-
Feb 24th, 2006, 03:51 AM
#3
Thread Starter
Arabic Poster
Re: howto: Hide pop-up menu
 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
-
Feb 24th, 2006, 04:01 AM
#4
Thread Starter
Arabic Poster
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
-
Feb 24th, 2006, 07:37 AM
#5
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.
-
Feb 24th, 2006, 07:59 AM
#6
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...
- ØØ -
-
Feb 24th, 2006, 09:08 AM
#7
Thread Starter
Arabic Poster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|