Welcome Guest ( Log In | Register )



2 Pages V  < 1 2  
Reply to this topicStart new topic
> Javascript: Disable Mouse Right-click In Browser
iGuest
post Feb 18 2008, 05:38 AM
Post #11


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



How to desable right click while opening new window?
Javascript: Disable Mouse Right-click In Browser

Hi,



I know how to desable right click in winow but I am unable to desable right click in new window.When ido I click on link and open a new window.



Pls reply..



Please do the needful.



-Amit Tiwari
Go to the top of the page
 
+Quote Post
iGuest
post Mar 4 2008, 04:13 AM
Post #12


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



Can it work with Safari?
Javascript: Disable Mouse Right-click In Browser

Does the code works for Safari? Coz I heard there are quiet a few codings that did have any effect with Safari.

-reply by dSpy
Go to the top of the page
 
+Quote Post
TavoxPeru
post Mar 5 2008, 07:46 AM
Post #13


Super Member
Group Icon

Group: [HOSTED]
Posts: 795
Joined: 8-April 06
From: Lima - Peru
Member No.: 12,579
myCENTs:26.78



QUOTE(FeedBacker @ Feb 18 2008, 12:38 AM) *
How to desable right click while opening new window?

java script: Disable Mouse Right-click In Browser
Hi,
I know how to desable right click in winow but I am unable to desable right click in new window.When ido I click on link and open a new window.
Pls reply..
Please do the needful.
-Amit Tiwari

I don't understand completely but in case the new window is yours then you must copy the code to it also, by yours i mean that you are the owner -the one who makes the page- of the opener and of the new window.

And, i don't know if it works with Safari because i don't use it.

Best regards,
Go to the top of the page
 
+Quote Post
KDEWolf
post Mar 7 2008, 07:50 AM
Post #14


Advanced Member
Group Icon

Group: Members
Posts: 179
Joined: 14-August 06
From: Vault 0 / Brazil
Member No.: 15,193



This is not only an annoying measure, it also cripples deeply usability. Not to say that nowadays with the steady growth of alternate browsers, mostly Firefox, Safari and Opera, it simply won't work. It's VERY hard to "hide" things like HTML/CSS/JS code from a curious or bad intentioned reasonably intelligent person.
I'd say this one is a big no-no.
Go to the top of the page
 
+Quote Post
jc804
post Mar 7 2008, 09:29 PM
Post #15


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 14
Joined: 7-March 08
Member No.: 28,957



Don't forget about the PrintScreen button on your keyboard.
Disabling right-click could be useful, but it won't protect your images.
Put in a water-mark and maybe decrease the resolution to a preview edition to protect your images.
Go to the top of the page
 
+Quote Post
KDEWolf
post Mar 7 2008, 10:57 PM
Post #16


Advanced Member
Group Icon

Group: Members
Posts: 179
Joined: 14-August 06
From: Vault 0 / Brazil
Member No.: 15,193



QUOTE(jc804 @ Mar 7 2008, 06:29 PM) *
Don't forget about the PrintScreen button on your keyboard.
Disabling right-click could be useful, but it won't protect your images.
Put in a water-mark and maybe decrease the resolution to a preview edition to protect your images.

Yes that's the way to go to protect images. But nowadays you've got to put the watermark in the very middle of the picture, since it's very common to have people cropping the original picture to remove watermarks from the borders and alike.
A clear example of it is the watermark option in DeviantArt. It's huge, it's very noticeable and right in the image center. It's actually awful to look at that, since it kind of screws the picture mood, but in the case of having constant problems, it's the only way to go.
Go to the top of the page
 
+Quote Post
TavoxPeru
post Mar 8 2008, 06:43 AM
Post #17


Super Member
Group Icon

Group: [HOSTED]
Posts: 795
Joined: 8-April 06
From: Lima - Peru
Member No.: 12,579
myCENTs:26.78



Another way for disabling the mouse right-click is by using the oncontextmenu event, if you add this javascript code:
CODE
<body oncontextmenu="return false">

to the body tag, you disable the context menu that appears whenever you right click in your page.

For protect your images you can use another image that covers the one you want to protect or a div that covers all your page (located in front of your page) like:
CODE
<div style="width:100%;margin:0px auto;z-index:10;top:0px;left:0px;background-color:transparent;height:100%"><img alt="image alt text" src="imagename" ></div>

And of course, you can use the imagetoolbar meta tag, this one will not protect your images, it simply disallow the image toolbar of Internet Explorer and Firefox:
CODE
<meta http-equiv="imagetoolbar" content="no">

Best regards,
Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Getting Screen Resolution using Javascript.(8)
  2. How To Create A Popup Window With Javascript?(19)
  3. javascript vs java(12)
  4. Best Way To Learn Javascript(9)
  5. Javascript: Text To Texbox And Back To Text(2)
  6. Dynamically Change The Background Image On Mouse Effects!(3)
  7. Change Table Colors On Mouse Effects!(8)
  8. Browser Quaker Script - Shock Your Visitors!(5)
  9. Javascript: Simple Slidedown Menu(2)
  10. JavaScript: Hide And Show Any Element With CSS(6)
  11. Ever Needs To Find Out A Table Height Or With With JavaScript(2)
  12. Create And Import JavaScript Modules For A Large Script(2)
  13. JavaScript Frames & Querystring(4)
  14. JavaScript Off Redirect Script(2)
  15. I Need Help With Javascript.(7)
  1. Problems With Dynamically Loading Javascript(2)
  2. One Click To Copy Script(0)
  3. Add Text To Textarea(6)
  4. Javascript Question(4)
  5. Javascript: How Do I Create Embedded Pop-up Windows?(7)
  6. Get Mouse Position(4)
  7. Problem With Javascript Alert();(9)
  8. Include Function For Javascript(7)
  9. Fun With Javascript And Forms(2)
  10. When A User Close The Browser Window(1)
  11. Javascript Help Needed : Alert(z) Works Fine But Document.write Not(2)
  12. Javascript Changes Aren't Working.(6)
  13. 12 Javascript Image Galleries(0)


 



- Lo-Fi Version Time is now: 22nd November 2008 - 10:10 PM