In my blog, i would discuss the problem i face in daily routine. Following are some of them: mysql error, mysql replication, mysql database corrupted repair, innodb tablespace corruption, mysql storage engines, mysql optimization and tuning, reinstall mysql linux server, linux command for dummies, linux administration tips, mysql administration tips, Linux server benchmarking
Wednesday, October 28, 2009
Monday, October 26, 2009
Way to disable the right click mouse
With the code below, you may modify it to become code to detect the onmouseclick on the document.body and do some action after that.
<HTML><HEAD> <script language="javascript"> function click(e) { if (navigator.appName == 'Netscape' && e.which == 3) { alert("no right click please") return false; } else { if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) alert("no right click please") return false; } return true; } document.onmousedown=click </script> </HEAD> <BODY> No right mouse button here! </BODY></HTML>
Wednesday, October 14, 2009
JAVA SCRIPT - Convert From String to Unicode
function toUnicode(theString) {
var unicodeString = '';
for (var i=0; i < theString.length; i++) {
var theUnicode = theString.charCodeAt(i).toString(16).toUpperCase();
while (theUnicode.length < 4) {
theUnicode = '0' + theUnicode;
}
theUnicode = '\\u' + theUnicode;
unicodeString += theUnicode;
}
return unicodeString;
}
Subscribe to:
Posts (Atom)