Disable Mouse Right Click, Cut, Copy & Paste

Disable Mouse Right Click, Cut, Copy & Paste? Full JavaScript code for disabling mouse right click and disable cut (CTRL+X), copy (CTRL+C) and paste (CTRL+V) from the web page. <script type="text/javascript"> $(document).ready(function () { //Disable cut copy paste $('body').bind('cut copy paste', function (e) { e.preventDefault(); }); //Disable mouse right click $("body").on("contextmenu",function(e){ return false; }); }); … Continue reading Disable Mouse Right Click, Cut, Copy & Paste

DISABLE MOUSE RIGHT CLICK

WANT TO DISABLE MOUSE RIGHT CLICK?? Disable mouse right click will prevent visitors from choosing the cut, copy and paste options. If you want to disable right mouse click for a particular section of a web page, then you can use a selector (#id, .class, etc.) otherwise use body selector for the full page. The following JavaScript … Continue reading DISABLE MOUSE RIGHT CLICK

Copy Container Text in JavaScript

Copy Container Text in JavaScript <script type="text/javascript"> function myFunction() {   /* Get the text field */   var copyText = document.getElementById("myInput");   /* Select the text field */   copyText.select();   /* Copy the text inside the text field */   document.execCommand("Copy");   /* Alert the copied text */   alert("Copied the text: " … Continue reading Copy Container Text in JavaScript

On Click Copy the text in javascript

On Click Copy the text in javascript $(".copy-mediaUrl").on('click' , function(){      var b = $(this);      var media_id = 'mediaurl-'+ b.data('id');      var $temp = $("<input>");      $("body").append($temp);       $temp.val( $('#'+ media_id).text() ).select();       document.execCommand("copy");       $temp.remove();       alert('Image Link Copied!'); });

TinyMCE URL Conversion Example

relative_urls : false, remove_script_host : false, convert_urls : true, LIKE:: <script> tinymce.init({        selector: '.rte',        height: 500,        theme: 'modern',        plugins: [               'lists link image media',               'searchreplace visualblocks code fullscreen',   … Continue reading TinyMCE URL Conversion Example

Select all Checkbox in Javascript

Select all Checkbox in Javascript:: <script type="text/javascript"> $(document).ready(function(){ $("#checkbx_selectall").on('change', function() { if(this.checked){             $('.__chckbx_select').each(function(){                 this.checked=true;             });         }else{              $('.__chckbx_select').each(function(){                 … Continue reading Select all Checkbox in Javascript

Check if Field is empty or Not in Javascript

Check if Field is empty or Not in Javascript:: $("#search-form").on('submit',function(){ var dis = $(this); searchbox = dis.find("input[name='product_name']").val(); var submitform = true; $("#search-form-msg").css('color','red'); if(searchbox.trim().length == 0){ submitform = false; $("#search-form-msg").html("Please type to a product search"); } return submitform; })