Short tip: Check if a SELECT contains a specific value

This simple function checks if the specified select contains the specified value and alias.

/** * Returns true if 'sV' (value) and 'sA' (alias) is contained in the options list 'l' (in the same option object) * * @author Johan Känngård, http://dev.kanngard.net */ function selectContains(l, sV, sA) { 	for(j=0;j<l.length;j++) { 		if((l[j].value==sA) &&(l[j].text==sV)){ 			return true; 		} 	} 	return false; }