Skip to main content

Posts

Showing posts with the label onmousedown

Preventing Copy,Paste and Right Click In Your Page

Hi Guys Everybody must have visited bank site there we can not do right click or copy Account number and paste in another field Retype Account Number. That means we should not give any chance to anybody to see page source. We do this for more security purpose.  That made me to think and try to design same in visual-force page. Here I have  only  used JavaScript  for this functionality.  There are some snippet of code.Hopefully It will help you.  Functionality  Preventing to see the Page Source. Preventing paste Email field value in Re Email field. Here is the page:- <apex:page StandardController="Contact">   <script>       function DisableRightClick(event){             if (event.button==2)         {             alert("Right Click is not Allowed");                ...