ManyCodes.com – codes & scripts Get free programming codes and tutorials!

22Jul/091

Don’t let the user use right click on mouse

Here is how you can disable right-click on your webpage.

Put the code below within your site's source code. If you dont know how to implement this code into your site, please goto how to implement the code to your website

Code:

<pre><!-- this script is from www.manycodes.com --></pre>
</style>
<SCRIPT language=JavaScript>
document.onmousedown=click
var times=0
var times2=10
function click() {
if ((event.button==2) || (event.button==3)) {
if (times>=1) { bye() }
alert("No right clicking!!!!!! don't do it again..");
times++ } }
function bye() {
alert("I said NO right clicking! click ok to exit LMAO!");
bye() }
</SCRIPT>
<pre>
<font face="Tahoma"><a target="_blank" href="http://www.manycodes.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font></pre>
Tagged as: , , , , , , , , 1 Comment
22Jul/095

Here is how you can implement the code to your website

Here is how you can implement the code to your website

JavaScript Free Code

22Jul/090

A message box when page opens

Here is how you can make a message box appear when your webpage opens.

Put the code below within your site's <head>  </head> tags. If you dont know how to implement this code into your site, please goto how to implement the code to your website

Code:

<pre><!-- this script is from www.manycodes.com -->

<script language="javascript" type="text/javascript">
alert("Welcome to my site")
</script>
<font face="Tahoma"><a target="_blank" href="http://www.manycodes.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font></pre>
22Jul/090

Make your website as user’s homepage

Here is how you can make the title of the your webpage scroll.

Put the code below within your site's source code. If you dont know how to implement this code into your site, please goto how to implement the code to your website

Code:

<!-- this script is from www.manycodes.com -->

<A

 style="CURSOR: hand; font-decoration: underline"

 onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.javascriptfreecode.com');"

 href="\">set as your home page</A><br><font face="Tahoma">
<font face="Tahoma"><a target="_blank" href="http://www.manycodes.com/"><span style="font-size: 8pt; text-decoration: none">JavaScript Free Code</span></a></font>