Thursday, December 2, 2010

Disable Right Click On Web Page Using jQuery

This is code used for disable right click


 $(document).ready(function()
  {
         $(document).bind("contextmenu",function(e){
         return false;
        });
 });

This code for disable right click on web pages. It is working all browsers excepted Opera..
try it..
Download add jQuery File . Here it is link http://jquery.com/

Disable Right Click Easily using jquery


<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>jQuery disable right click</title>
<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" language="javascript">

           $(function() {
             $(this).bind("contextmenu", function(e) {
                    e.preventDefault();
             });
   });
</script>
</head>

<body>
        jQuery disable right Click
</body>
</html>

TextBox with Curve Shape using CSS

Textbox with curve shape...

Create a html textbox. then Add a CSS Class for the textbox.

      The following code

input[type="text"] {
border: 1px solid #505050; /*#123360;*/
font-size: 12px;
width: 180px;
height:17px;
-moz-border-radius:3px;
-khtml-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
}