I do not personally know Javascript. I have created a script that will disable all right clicks anywhere on the page, and all clicks on images. I want to keep this functionality, with one exception, I want users to be able to left click on images that are links.
Do I need to add something to the IMG tag to bypass the script for those images, or do I need to modify the script?
Here is the current script I am using (like I said, I dont know Javascript, let me know if you see an easier way, or a way to improve it...)
A right click disabler is obsolete and useless. You can always see the source by clicking View => View Source in I.E. and have the links to the images to save them.
__________________ I don't suffer from insanity, I enjoy every single minute of it!
Not really that obsolete or useless, when combined with other security precautions I am taking on my site.
Here is what the first 15 lines of my site (in real HTML) appears like under view source:
All my images are served through a special script which checks to make sure the referring page is part of my site.
The image toolbars are disabled, and any attempts to load my images directly by entering in the address bar result in a 403 Forbidden Error.
I just need this script to stop them from dragging the image to a folder, or right clicking, and pressing save image as.
For obvious reasons, I need to be able to allow users to click on images on the sidebar that serve as links.
Is there any way I can do this?
Not that it'll do you any good, but at least this provides an interesting perspective on behaviors and bindings.
Note: Since the disabling of right click on images is done through CSS, this also includes any img's dynamically added to the document after page load, without relying on document-level events such as onmousedown. Which means other scripts can still make use of those events... preventing conflicts.
For me the most interessting thing is, how Philip M managed it to "disentangle" the coded script...I'd be really pleased, if you would tell me how you did it!....plzplzplz
For me the most interessting thing is, how Philip M managed it to "disentangle" the coded script...I'd be really pleased, if you would tell me how you did it!....plzplzplz
Thee are numerous ways to unobfuscate code... Using the Mozilla DOM Inspector is probably the fastest but I often use this bookmarklet:
As for the images, well, lets just say if I want any or all of your images I just overwrite your document, effectively removing any and all of your so called security precations, and only display the images and then easily pick and choose from there...
Love your code for the bookmarklet. Excuse my ignorance but how do I set it up as a bookmark?
Place it on a page as a link and either drag it to your Favorites or Bookmarkets folder and save or right click and Add to Favorites... Don't worry about the security warning and just acknowledge it...
Try pasting the snippet into your addressbar and then drag the icon to your favorites... The way it is written is apparently launching the document.write statement(s) when used with the javascript protocol...
error "system cannot find path specified" Arrrgh!!! I'm just gpoing to save it as a text file and paste it when needed. That works fine . Thanks again for your help.