Javascript code pieces

Useful code written to work and to be understood


nthist_ajax.js
// nthist_ajax.js
// nice wrapper for ajax queries
// example: new nthist_ajax( { url:your.cgi, callback: function_expecting_string_as_arg, params: [ [ p1, v1 ], [ p2, v2 ], [ p3, v3 ] ] } ); 

nthist_dbtoobj.js
/* nthist_dbtoobj 
 * for processing the response to ajax queries
 * convert database output to an array of javascript object 
 * expects one or more of 
 *  [o|t]<name> 
 *  output of "psql -A -d<database> -c<query>"
 *  where o indicates object, one row is processed
 *	and t indicates array of objects and every row is processed
 *  
 */

nthist_event.js
// nthist_event.js
// three wrappers for events
// inspired by incompatibility between ie6 and the world

nthist_cookies.js
// nthist_cookies.js
// wrappers for cookies
// create and read cookies

nthist_spinner.js
// nthist_spinner.js
// 
//	displays the number passed in the element designated,
//	lets the rightmost digits change while freezing the eleftmost digits one at a time.
//	when the number is finished displaying, the "call back" function ( if passed) is called.
//  Click for Demo