Please donate to keep this site running. Thank you.


Silent Right Click

============================================================

Script:    Basic No-Right-Click Script

Functions: Blocks right-click on mouse but does *not* show

           an alert box or message.

Browsers:  All (4.X and later)

Author:    etLux

============================================================

Put the following script in the head of your page:

<script language=”JavaScript” type=”text/javascript”>

<!—

//Disable right click script III- By Renigade (renigade@mediaone.net)

//For full source code, visit http://www.dynamicdrive.com

var message=”“;

///////////////////////////////////

function clickIE() {if (document.all) {(message);return false;}}

function clickNS(e) {if 

(document.layers||(document.getElementById&&!document.all)) {

if (e.which==2||e.which==3) {(message);return false;}}}

if (document.layers) 

{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}

else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function(“return false”)

// —> 

</script>

4 notes

Popup for your page tutorial

I added a tutorial on how to add a popup when visitor enter and/or exit your page

http://tumblr-layouts.tumblr.com/tutorial/enter-popup
Popup alert when your visit enters your page

http://tumblr-layouts.tumblr.com/tutorial/exit-popup
Popup alert when your visitor exits your page

http://tumblr-layouts.tumblr.com/tutorial/no-right-click
No Right click at all.

More tutorials coming soon.

1 note

Halloween Special: Flying Bats

<script language=”JavaScript1.2”>
<!—

/*
Flying Bats- By Dynamic Drive, based on script by Kurt (kurt.grigg@virgin.net)
For full source, usage terms, and 100’s more DHTML scripts
Visit http://www.dynamicdrive.com
tumblr-layouts.tumblr.com
*/

Cupid=new Image();
Cupid.src=”http://img291.imageshack.us/img291/6371/bate.gif”; //specify path to bat image
amount=3; //Number of cupids, minimum must be 3.
Xpos=700; //cupids x coordinates, in pixel
Ypos=200; //cupids y coordinates, in pixel
step=0.3; //Animation speed (smaller is slower)
dismissafter=15; //seconds after which Cupids should disappear, in seconds

var ns6=document.getElementById&&!document.all
bats=new Array(3)
if (document.layers){
for (i=0; i < amount; i++)
{document.write(“<LAYER NAME=n”+i+” LEFT=0 TOP=-50><a href=’http://www.dynamicdrive.com’><IMG SRC=’”+Cupid.src+”’ NAME=’nsi’ width=69 height=60 border=0></a></LAYER>”)}
}
else if (document.all||ns6){
document.write(‘<div id=”out” style=”position:absolute;top:0;left:0”><div id=”in” style=”position:relative”>’);
for (i=0; i < amount; i++){
if (document.all)
document.write(‘<a href=”http://tumblr-layouts.tumblr.com”><img src=”’+Cupid.src+’” id=”msieBats” style=”position:absolute;top:-50;left:0” border=0></a>’)
else
document.write(‘<a href=”http://tumblr-layouts.tumblr.com”><img src=”’+Cupid.src+’” id=”ns6Bats’+i+’” width=69 height=60 style=”position:absolute;top:-50;left:0” border=0></a>’)
}
document.write(‘</div></div>’);
}

yBase=xBase=currStep=a_count=0;
b_count=1;
c_count=2;
d_count=3;
move=1;
if (document.layers||ns6){
yBase=window.innerHeight/3;
xBase=window.innerWidth/6;
if (document.layers)
window.captureEvents(Event.MOUSEMOVE);

}
if (document.all){
yBase = window.document.body.offsetHeight/3;
xBase = window.document.body.offsetWidth/6;
}

function dismisscupid(){
clearInterval(flycupid)
if (document.layers){
for (i2=0; i2 < amount; i2++){
document.layers[‘n’+i2].visibility=”hide”
}
}
else if (document.all)
document.all.out.style.visibility=”hidden”
else if (ns6)
document.getElementById(“out”).style.visibility=”hidden”
}

if (document.layers){
for (i=0; i < amount; i++)
document.layers[‘n’+i].document.images[‘nsi’].src=Cupid.src
}
else if (document.all){
for (i=0; i < amount; i++)
document.all.msieBats[i].src=Cupid.src
}
else if (ns6){
for (i=0; i < amount; i++)
document.getElementById(“ns6Bats”+i).src=Cupid.src
}

function Animate(){
a_count+=move;
b_count+=move;
c_count+=move;
currStep+=step;
if (a_count >= bats.length) a_count=0;
if (b_count >= bats.length) b_count=0;
if (c_count >= bats.length) c_count=0;
if (document.layers){
for (i=0; i < amount; i++) {
var NewL=”n”+i
document.layers[NewL].top = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
document.layers[NewL].left =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
}
}

if (document.all){
for (i=0; i < amount; i++){
document.all.msieBats[i].style.pixelTop = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
document.all.msieBats[i].style.pixelLeft =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
}
}

if (ns6){
for (i=0; i < amount; i++){
document.getElementById(“ns6Bats”+i).style.top = Ypos+yBase*Math.sin(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/10)
document.getElementById(“ns6Bats”+i).style.left =Xpos+xBase*Math.cos(((currStep)+i*3.7)/4)*Math.cos((currStep+i*35)/62)
}
}

}
flycupid=setInterval(‘Animate()’,30);
setTimeout(“dismisscupid()”,dismissafter*1000)
//—>
</script>


Post this before </body>

1 note

No Right Click on Images

<script language=”JavaScript1.2”>
/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
tumblr-layouts.tumblr.com
*/

var clickmessage=”Right click disabled on images!”

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName==”IMG”){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName==”IMG”){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
</script>


———————
follow me: click to follow

1 note
eXTReMe Tracker
Web Development & Design - Top Blogs Philippines
Quotes, layouts, and more <- click
Tumblr-Cursors <- click