WebBuilder101 - Making the web happen!
Need Web Dev software? Here is the place to
Flash Point

How to disable mouse buttons

Disabling the Left Click button

<script language="javascript">
function click() {
if (event.button==1) {
alert('You can not use mouse buttons here')
}
}
document.onMouseDown=click
</script>

Disabling both the Right and left Click button

<script language="javascript">
function click() {
if (event.button==1 || event.button==2) {
alert('You can not use the mouse buttons here')
}
}
document.onMouseDown=click
</script>

Now, let's see it in action.

Again, keep in mind that disabling someone's mouse buttons won't necessarily keep them from copying your work. Also, this script may not work on all browsers (Netscape comes to mind).

Lastly, like a friend of mine says, if you really want to protect your work, the best solution is not to publish it. ;-)

Back to intro...Next

.

 

More Resources
Scrolling Text
Create Rollovers
Taking and pasting input to your web page
Put the current date on your site
Customize Messages
Change Background colors

Suggested Reading

Beginning Active Server Pages 3.0
JavaScript Bible
Red Hat Linux
Dreamweaver 3.0
HTML Bible



Download WB101 Wallpaper
• Web Builder 101 Wallpaper Get it!.
• Find out how to create your own Wallpaper Teach me!.
Sign up for our Newsletters
• Web Building Sign me Up!.
• Net Alert! Sign me Up!.
Need Help?
• Contact Support Click here.
• E-mail the Webmaster Click Here.
• Search Tips Click Here.

Webbuilder101.com © 1998 - 2003 Copyright and Terms of Use
Send mail to: webmaster@webbuilder101.com

» About » Support

» FAQ » What's New » MyLog

Web Builder 101 Web Builder 101 - Making the Web Happen Web Builder 101 - Making the Web Happen
.