Search for:
Jump to: 
Your Ad Here
Post new topic Reply to topic
Author Message
 Post subject: How to remove right click option in a web page using js
PostPosted: Fri Oct 21, 2011 1:08 pm 
Offline

Joined: Mon Nov 12, 2007 10:12 am
Posts: 355
Hi Friends,

To remove the right click option ina web page using javascript , Please follow the below code.

Code:
<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>

May this helps you :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic    [ 1 post ] 

1, 2, 3, 4, 5 ... 413
Recent topics  Replies   Views   Last post 
No new posts How to Convert DVD and Video to Your iphone 4,iphone 4 to pc

by smsbackuper » Wed May 18, 2011 8:11 am in PHP-Code Help

2

1441

Thu May 23, 2013 6:39 am

greenwoove View the latest post

No new posts Jquery ajax Pagination using php

by rajkumar » Tue Apr 19, 2011 11:14 am in Coding Repository

8

17623

Mon May 20, 2013 2:46 am

gfsdfg View the latest post

No new posts How to upgrade and migrate Joomal site

by mallikharjuna rao » Mon Jan 21, 2013 1:40 pm in Joomla

1

368

Thu May 16, 2013 9:53 am

sunitha12 View the latest post

No new posts Benefits of PHP

by hirephpexpert » Fri Sep 07, 2012 4:41 am in CakePHP

6

1620

Wed May 15, 2013 6:25 am

PrettyPrincesG View the latest post

No new posts How to stop user from getting registered in Joomla

by mallikharjuna rao » Tue Jan 22, 2013 5:16 am in Joomla

3

1601

Wed May 15, 2013 6:17 am

PrettyPrincesG View the latest post


Your Ad Here