web/wp-content/themes/IRI-Theme/js/functions.js
author hurons@caf4f556-3d62-0410-8435-a86758001935
Mon, 01 Feb 2010 09:51:57 +0000
branchwordpress
changeset 123 561aa6d282f6
parent 109 03b0d1493584
permissions -rw-r--r--
pre production version : ****************************** Template evolution : - css ( so much things) - js ( new navigation tools ...) - lib for php ZIp - function.php (for download LDT and other litle function) - page (header, home, footer, single, search, searchform, post ...) ****************************** New plug in : - wp touch - wp explorer - TextCutter - ultimate-google-analytics - nice titles ****************************** Plug in customization : - related-posts-by-category - posts-of-current-category - order-categories - event-calendar - translation wp explorer - exec-php ****************************** Road map for next version : - cleaning php code put template function to new plugin - cleaning Css code - re organize Js code - all new correction ask

/************************************************************
 ** Clears a field
 ** By: 	Joshua Sowin (fireandknowledge.org)
 ** HTML: <input type="text" value="Search" name="search"
 **			id="search" size="25" 
 ** 		onFocus="clearInput('search', 'Search')" 
 ** 		onBlur="clearInput('search', 'Search')" />
 ***********************************************************/
function clearInput(field_id, term_to_clear) {
	
	// Clear input if it matches default value
	if (document.getElementById(field_id).value == term_to_clear ) {
		document.getElementById(field_id).value = '';
	}
	
	// If the value is blank, then put back term
	else if (document.getElementById(field_id).value == '' ) {
		document.getElementById(field_id).value = term_to_clear;
	}
} // end clearSearch()