2013-07-10, 05:40 AM
2013-07-10, 01:36 PM
instead of using jquery and making things complicated, i believe that this piece of code would just do it.... add it in headerinclude and relax
this is the script that i have recommended to a site where i am a member of and it works perfectly....
the good thing about this script is that this actually disables the right click only on images but on other elements you can right click
this is the script that i have recommended to a site where i am a member of and it works perfectly....
the good thing about this script is that this actually disables the right click only on images but on other elements you can right click
<script type="text/javascript">
var alertMsg = "//ENTER YOUR CUSTOM WARNING MESSAGE HERE//";
function nocontext(e) {
var clickedTag = (e==null) ? event.srcElement.tagName : e.target.tagName;
if (clickedTag == "IMG") {
alert(alertMsg);
return false;
}
}
document.oncontextmenu = nocontext;
</script>
2013-07-10, 01:42 PM
I guess jQuery makes things simpler than traditional Javascript.
The function provided with jQ is also affects only on images. I don't know what made you believe that has an impact to the whole.
The function provided with jQ is also affects only on images. I don't know what made you believe that has an impact to the whole.
2013-07-10, 01:49 PM
This code seems to not work bro.
where I had to put it down. ?
code given by the effone but nothing seems to work its option.
if there is the option I might get a user to click on the option that I gave.
where I had to put it down. ?
code given by the effone but nothing seems to work its option.
if there is the option I might get a user to click on the option that I gave.
2013-07-10, 02:07 PM
I can't get what you say.
However the code provided by me is tested and it will affect every single image of your site regardless of any "option" > if anyone right click on any of the images in your site : no context menu will appear.
However the code provided by me is tested and it will affect every single image of your site regardless of any "option" > if anyone right click on any of the images in your site : no context menu will appear.
2013-07-10, 02:17 PM
(2013-07-10, 01:49 PM)ikhwanulfikri Wrote: [ -> ]This code seems to not work bro.
where I had to put it down. ?
i can be 100% sure that it works bro, because i am using it on my friend's site for more than 5/6 months now....
(2013-07-10, 01:42 PM)effone Wrote: [ -> ]I don't know what made you believe that has an impact to the whole.
because i didnt actually check the thread you have linked.... sorry for that, checked just now
(2013-07-10, 02:07 PM)effone Wrote: [ -> ]However the code provided by me is tested and it will affect every single image of your site regardless of any "option" > if anyone right click on any of the images in your site : no context menu will appear.
i guess he needs a popup or something saying that it is diabled
2013-07-10, 02:20 PM
hello effone.
I want the code given option.
I want to give the user the option to right-click when he's doing. or go back to the image.
I want the code given option.
I want to give the user the option to right-click when he's doing. or go back to the image.
2013-07-10, 02:29 PM
Based on the picture in your first post, it is using css, not js.
2013-07-10, 02:37 PM
if you could give me a little code for the option to right click on the image mei chan.?
2013-07-10, 02:41 PM
It use CSS background properties. You can look at your showthread.css.