Find articles on computer software, programming, ASP.net, Sql server, databases, C#, websites, Internet, Windows, Outlook macros.
Here is some useful code to protect the content of your website from the average viewer who may casually try to grab it.
Of course, this will not prevent a determined person.
You can cut and paste all as is into your web page or just the parts you want to disable.
<script type="text/javascript">//-----------------------------------------------------// Disable selectdocument.onselectstart=new Function('return false');function ffalse(e) {return false;}function ftrue() { return true; }document.onmousedown = ffalse;document.onclick = ftrue;//-----------------------------------------------------// Disable right clickvar message="You may not right click on this page.";function noclick(e) { if (document.all) { if (event.button == 2) { alert(message); return false; } } if (document.layers) { if (e.which == 3) { alert(message); return false; } } }if (document.layers) { document.captureEvents(Event.MOUSEDOWN); }// Override what was sent under disable select abovedocument.onmousedown=noclick;//-----------------------------------------------------</script><style type="text/css">/* disable print */@media print {body {display:none;}}</style>
Some browsers let users drag click on an image and then drag the image to their desktop. To prevent image dragging you can add this code to each image.
<img src="image.png"onmousedown="if (event.preventDefault) event.preventDefault()">
AWeber Email List Marketing Test Drive
Use email marketing to convert targeted subscribers to customers. Let the system sell itself for you!