public/javascripts/inputex/js/fields/SelectTwiceField.js
function() {
			
			var i, length, choicesList, secondSelectValues, testValue;
			
			// allowed values in second select
			secondSelectValues = this.valuesMatching[this.selects[0].getValue()];
			
			// all choices in second select
			choicesList = this.selects[1].choicesList;
			
			for (i = 0, length = choicesList.length; i < length; i += 1) {
				
				testValue = choicesList[i].value;
				
				if (inputEx.indexOf(testValue, secondSelectValues) === -1) {
					this.selects[1].hideChoice({ position: i }, false); // no updatedEvt in case of clear (because multiple clear could happen...)
				} else {
					this.selects[1].showChoice({ position: i });
				}
				
			}
			
		}
function() {
			
			var i, length, choicesList, secondSelectValues, testValue;
			
			// allowed values in second select
			secondSelectValues = this.valuesMatching[this.selects[0].getValue()];
			
			// all choices in second select
			choicesList = this.selects[1].choicesList;
			
			for (i = 0, length = choicesList.length; i < length; i += 1) {
				
				testValue = choicesList[i].value;
				
				if (inputEx.indexOf(testValue, secondSelectValues) === -1) {
					this.selects[1].hideChoice({ position: i }, false); // no updatedEvt in case of clear (because multiple clear could happen...)
				} else {
					this.selects[1].showChoice({ position: i });
				}
				
			}
			
		}
function ( ) { var i , length , choicesList , secondSelectValues , testValue ; // allowed values in second select secondSelectValues = this . valuesMatching [ this . selects [ 0 ] . getValue ( ) ] ; // all choices in second select choicesList = this . selects [ 1 ] . choicesList ; for ( i = 0 , length = choicesList . length ; i < length ; i += 1 ) { testValue = choicesList [ i ] . value ; if ( inputEx . indexOf ( testValue , secondSelectValues ) === - 1 ) { this . selects [ 1 ] . hideChoice ( { position : i } , false ) ; // no updatedEvt in case of clear (because multiple clear could happen...) } else { this . selects [ 1 ] . showChoice ( { position : i } ) ; } } }
adapt choices of 2nd select relatively to 1st select value
adapt choices of 2nd select relatively to 1st select value