html course, website building, perl scripting, mysql databases, web site builder, build a website, disable right mouse, disable right mouse click

  

 



Testimonial

Hey Dave:

You are brilliant! I was skeptical when I reviewed Instant Site Maker. I mean, I am a professional Webmaster after all. The first thing I noticed was the simplicity of your tool. Just plug in the info and walla, a gorgeous web page. I'll be using this on my next mini-site project. Thanks for bringing Instant Site Maker to market. You've made my life easier and probably for thousands of others!

Jim Mandich, Storm Golf

disable right mouse



If you want to disable the right mouse click, to stop someone grabbing your images or looking at your html/javascript code just use this simple script below:

JavaScript Code to Disable Right Mouse Click

<SCRIPT LANGUAGE="JavaScript">
function noRightClick(buttonClicked) {
if (navigator.appName == 'Netscape' &&
(buttonClicked.which == 2 || buttonClicked.which == 3))
 return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 3 || event.button == 2)) {
 alert("Your Message Goes Here");
return false;
}
return true;
}
document.onmousedown=noRightClick;
document.onmouseup=noRightClick;
if (document.layers)
 window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
 window.onmousedown=noRightClick;
 window.onmouseup=noRightClick;
</script>

Please note

The message displayed when someone clicks their right mouse button is contained in the line:

alert("Your Message Goes Here");

If the message you enter also has quotes in it they need to be escaped with a backslash

e.g. alert("Your \"Message\" Goes Here");

If you use quotes in your message and don't escape them the script will fail!

You can download a simple right click code generator script utility from this page here.

To see an example of the script in action click here just right click anywhere in the page.

 




Main Menu

web site tools
build a website blog
html help
html redirect
html marquee
html form
instant site maker
simple style sheet
is your site on life support
internet marketing
meta tags
perl cgi
javascript
javascript display date
email filters
simple email form
protect your code
disable right mouse
help visitors bookmark your site
free hosting vs paid
accept credit card payments
card payments using clickbank
newsletter
sep 29 newsletter
oct 10 newsletter
oct 24 newsletter
what is bandwidth
how much web space
contact us
resources
link to us
Links Directory

 

 

© All rights Reserved. No part of this site may be reproduced or copied without permission of the owners.
Site Directory