Just a little girl who often lost in her own thoughts. Believed that she can't always tell people everything about her.
Dream ♥
Tutorial (Disable right click with alert)
Saturday, 21 April 2012 | 0 ☰
Hahaha! Buat tutorial first time kat blog ni. Kekeke, okay straight to the tajuk kan, mesti korang dah selalu dengor kan? Ala, Nadiot saje je nak penuh kan tutorial. ^^ Ha, ni ha.

 1. dashboard > design > page element > add gadget > html/javascript 
Kalau classic punya, yang sama gak, tapi yang tukar nya macam ni..
Dashboard > Template 

Okay, dah kan?
2. Lepas tu.. Awak copy ni (ceh, main awak awak segala) 

Cari benda alah ni <head>. Takyah cari pun takpe, (bagi yang pakai classic). Benda tu ada kat atas sekali! :D


<script language=JavaScript><!--
//edit by unwanted

var message="Tulis message alert anda";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// -->
</script>

///////////////////////////////////function clickIE4(){if (event.button==2){alert(message);return false;}}
function clickNS4(e){if (document.layers||document.getElementById&&!document.all){if (e.which==2||e.which==3){alert(message);return false;}}}
if (document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS4;}else if (document.all&&!document.getElementById){document.onmousedown=clickIE4;}
document.oncontextmenu=new Function("alert(message);return false")
// --></script>


*Yang merah tu, tukar la mesej awak tu.
3. Lepas tu, tengok dulu! Click "preview" first! Tengok kalau menjadi. Lepas tu baru boleh tekan save. If you don't mind, write the credit to me. :)

« Newer
Older »