function collectFossils()
	{
		var fossilex =  /^(.*)-fossil$/;
		var fossils = {};
		if (elements)
		{
			jQuery(':input').each(function()
			{
				var element = elements[i];
				// see if name exists and matches regex
				if (this.name)
				{
					var matches = this.name.match(fossilex);
					if (matches != null)
					{
						// use the name sans '-fossil' to store the element
						// this saves having to parse the field name again
						// later in processing.
						fossils[matches[1]] = this;
					}
				}
			});
		}
		return fossils;
	}
/**
	 * Collect all fossils on the page along with the user input fields
	 */
Collect all fossils on the page along with the user input fields
Collect all fossils on the page along with the user input fields
function collectFossils()
	{
		var fossilex =  /^(.*)-fossil$/;
		var fossils = {};
		if (elements)
		{
			jQuery(':input').each(function()
			{
				var element = elements[i];
				if (this.name)
				{
					var matches = this.name.match(fossilex);
					if (matches != null)
					{
						fossils[matches[1]] = this;
					}
				}
			});
		}
		return fossils;
	}
function collectFossils ( ) { var fossilex = / ^(.*)-fossil$ / ; var fossils = { } ; if ( elements ) { jQuery ( ':input' ) . each ( function ( ) { var element = elements [ i ] ; if ( this . name ) { var matches = this . name . match ( fossilex ) ; if ( matches != null ) { fossils [ matches [ 1 ] ] = this ; } } } ) ; } return fossils ; }
Collect all fossils on the page along with the user input fields
Collect all fossils on the page along with the user input fields
// see if name exists and matches regex // use the name sans '-fossil' to store the element // this saves having to parse the field name again // later in processing.