Thursday, May 29, 2014
Javascript default browser alert overide
Plugin for override javascript default browser alert. Add to any js and call the function with require arguments.
Code......\|/
Tuesday, May 27, 2014
CodeBlocks Installing and Troubleshooting in UBUNTU
Code::Blocks is a cross-platform Integrated Development Environment. Most of its functionality is already provided by plugins.
For Installation use this link. Or in terminal execute,
sudo apt-get install codeblocks
Thursday, May 22, 2014
Tips for JS
Seacrh a value exists in string or array (indexOf()
var str = "Hello world";
var n = str.indexOf("world")
This will return 2 for n. (Position of search key "world").
For not existing values this function will return -1. ;)
* When delete an item in array always use splice instead of delete. Coz delete will replace the deleted item from undefined but splice not.
============================================================================
Disable Backspace and delete key
Insert following code in JS file
function disableBackspace(evt, obj) {
var charCode = (evt.which) ? evt.which : evt.keyCode
if ((charCode == 8 || charCode == 46) && clientMaskcurr.length >= obj.selectionEnd ) return false;
return true;
}
Insert following code in HTML related input
<input disableBackspace(event,this) .... >
Subscribe to:
Posts (Atom)