Tuesday, May 10, 2011

PHP in SimpleXML How to get a node with hyphen(-) ?



How to get a node with hyphen(-), PHP in SimpleXML ? 

$xml = simplexml_load_file( $fileName );
$post_list  = $xml->blog->{'post-list'};



Wednesday, September 1, 2010

Linux: To find a "text" in a "File"


Linux Command : To find a "text" in a "File"

find . -type f -iname "filename.txt" -exec grep -iaH "text" {} \;



Tuesday, May 4, 2010

To get hash '#' ID from URL using Javascript


To get hash '#' ID from URL


< script type="text/javascript" >
if( window.location.hash ) {
var str = window.location.hash;
var str_split = str.split("#");
var getid = str_split[1];
}

< /script >

Monday, January 18, 2010

jQuery 1.4 Released

jQuery 1.4 Released Download

Wednesday, January 13, 2010

jQuery UI Multiselect

Plugin: jQuery UI Multiselect

Features :

  • Search within available options, if there are a lots of them
  • Displaying counts of selected and available items
  • Select All / Deselect All Buttons
  • Dragging items from the available list to the selected list directly

Tuesday, August 25, 2009

How to get Browser Window Size?

How to get Browser Window Size?

function getBroWinSize() {

var objDocEle = document.documentElement;
var objDocBdy = document.body;
var myWidth = 0, myHeight = 0;

if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
}

else if(objDocEle &&(objDocEle.clientWidth || objDocEle.clientHeight)) { //IE 6+
myWidth = objDocEle.clientWidth;
myHeight = objDocEle.clientHeight;
}

else if(objDocBdy &&(objDocBdy.clientWidth || objDocBdy.clientHeight)){ //IE 4
myWidth = objDocBdy.clientWidth;
myHeight = objDocBdy.clientHeight;
}

window.alert( 'Width = ' + myWidth );
window.alert( 'Height = ' + myHeight );

}//
getBroWinSize

Tuesday, August 18, 2009

Javascript Libraries

Javascript Libraries

http://javascriptlibraries.com/

What is JavaScript library?

What is JavaScript library?

A JavaScript library is a library of pre-written JavaScript controls which allow for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies. (eg:- JQuery, Mybic...)

Sunday, August 16, 2009

Suppress JavaScript error

Code to Suppress JavaScript error


<SCRIPT language="JavaScript">

<!--
function suppressJSError() {
return true;
}
window.onerror=suppressJSError;
//-->

</SCRIPT>