This script takes the search form at the top of the templates, inserts default text (from the title attribute) into the text input and disables the submit button. When the input field gains focus the default text is removed. When something other than the default text or an empty string is entered into the field the submit button is enabled.
Usage: uM_search.prepare();
Parameters: none
Effect: Disables the submit button, inserts the default text and adds listeners to the text input of the search bar
Returns: nothing
Hat-tip:
Processing:
Usage: uM_search.startCheck(e);
Parameters: e - event for modern (non-IE) browsers
Effect: removes the default text and starts checking for search terms
Returns: nothing
Hat-tip:
Processing:
Usage: uM_search.toggleSubmit(input);
Parameters: input - element reference: the text input to check the value of
Effect: enables/disables the submit button
Returns: nothing
Hat-tip:
Processing:
Usage: uM_search.endCheck(e);
Parameters: e - event for modern (non-IE) browsers
Effect: stops checking
Returns: nothing
Hat-tip:
Processing: