*

omadmin

  • ***
  • 22 posts
<Solve> How Disable Right Click For Image, Copy, Paste, Cut?
« on: September 02, 2020, 04:32:58 PM »
Hi Everyone

I have test some code for disable, but i consufed this for html or iframe

Quote
$(document).bind('copy', function(e) {         alert('Copy is not allowed !!!');         e.preventDefault();     });      $(document).bind('paste', function() {         alert('Paste is not allowed !!!');         e.preventDefault();     });      $(document).bind('cut', function() {         alert('Cut  is not allowed !!!');         e.preventDefault();     });     $(document).bind('contextmenu', function(e) {         alert('Right Click  is not allowed !!!');         e.preventDefault();     });


i tested in header.php, item.php, main.php doesnt work
« Last Edit: September 03, 2020, 09:41:45 AM by omadmin »
an Website Specialist

Marked as best answer by frosticek on September 03, 2020, 02:30:51 PM
*

MB Themes

Re: How Disable Right Click For Image, Copy, Paste, Cut?
« Reply #1 on: September 02, 2020, 04:40:44 PM »
@omadmin
Try to put it into footer into <script> .. your code </script> tags
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

omadmin

  • ***
  • 22 posts
Re: How Disable Right Click For Image, Copy, Paste, Cut?
« Reply #2 on: September 03, 2020, 09:40:07 AM »
@omadmin
Try to put it into footer into <script> .. your code </script> tags

Awesome, it's work
an Website Specialist

*

omadmin

  • ***
  • 22 posts
Re: How Disable Right Click For Image, Copy, Paste, Cut?
« Reply #3 on: September 10, 2020, 06:14:37 PM »
@omadmin
Try to put it into footer into <script> .. your code </script> tags

It not working when user using ios.. my friend tested still can save image on right click. Do you have solution script for ios?
an Website Specialist

*

MB Themes

Re: <Solve> How Disable Right Click For Image, Copy, Paste, Cut?
« Reply #4 on: September 13, 2020, 09:48:39 PM »
@omadmin
Well it's your solution and it is probably based on device & browser. Ios browser is not too much "standard" and is more-less same as internet explorer used to be.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots