Posts

Showing posts with the label functions()

jQuery code to disable double click event

jQuery code to disable double click event on the webpage. $(document).ready(function(){ $("*").dblclick(function(e){ e.preventDefault(); }); }); Above jQuery code will disable double click event for all the controls on the webpage. If you want to disable for specific control, let's say a button with ID "btnSubmit" then, $(document).ready(function(){ $('#btnSubmit').dblclick(function(e){ e.preventDefault(); }); });

How to disabled Right click function in webpages?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <html xmlns=" http://www.w3.org/1999/xhtml "> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>rightclick_disabled</title> </head> <body bgcolor="#000000"> <script language=JavaScript> <!-- //Disable right mouse click Script //By Maximus ( maximus@nsimail.com ) w/ mods by DynamicDrive //For full source code, visit http://www.dynamicdrive.com var message="Function Disabled!"; /////////////////////////////////// function clickIE4() { if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); do...