Your Ad Here

Home » JavaScript »

2

Hi friends,

After working hard to complete your  design and images  ,some persons just save that images and web pages.

This is one  idea to disable the right click on webpage.

just put a small javascript code at the place between the head section.

*************************

<SCRIPT LANGUAGE=”JavaScript”>
<!– Disable
function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function (“return false”)
document.oncontextmenu=new Function (“return false”)
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
//–>
</script>

*****************************

Demo at @ http://labs.anil2u.info/disable-rightclick.php


You may like these posts

    PHP Captcha and reCaptcha options for web forms using javascriptSimple JavaScript validation for datesSimple tooltip using javascript and css?Multi-language support for web application with MySql and PHP

 

2 Comments

  1. Nice tip anil.. Are you interested to write an artilce on my blog..

    Just togeather all your old post. Sure your blog traffic increase through my blog

  2. Sumeet says:

    Thanx champ, Thanx a lot for all your good work. Keep Posting.

Leave a Reply