I have a dynamic dropdown where a list of airports is populate using replacement tags, what I want to do is add a value to say "airport not in list" how can this be done. Here is the code for the dynamic populating:
function checkCollectionMethod() {
if ("(COLLECTION_METHOD)" == "WALKIN") {frmDetails.fldCollectionMethod[1].checked=true;}
cDepAirTxt = new Array ((DEPARTURE_AIRPORT_NAMES));
cDepAirVal = new Array ((DEPARTURE_AIRPORT_VALUES));
for (var i = 0; i < cDepAirTxt.length; i++) {
frmDetails.fldDepartureAirport[frmDetails.fldDepartureAirport.length] = new Option (cDepAirTxt, cDepAirVal);
if (cDepAirVal == "(DEPARTURE_AIRPORT)") {frmDetails.fldDepartureAirport[i + 1].selected = true;} // Use i + 1 because option 0 is "(Please select...)"
}
Thanks
function checkCollectionMethod() {
if ("(COLLECTION_METHOD)" == "WALKIN") {frmDetails.fldCollectionMethod[1].checked=true;}
cDepAirTxt = new Array ((DEPARTURE_AIRPORT_NAMES));
cDepAirVal = new Array ((DEPARTURE_AIRPORT_VALUES));
for (var i = 0; i < cDepAirTxt.length; i++) {
frmDetails.fldDepartureAirport[frmDetails.fldDepartureAirport.length] = new Option (cDepAirTxt, cDepAirVal);
if (cDepAirVal == "(DEPARTURE_AIRPORT)") {frmDetails.fldDepartureAirport[i + 1].selected = true;} // Use i + 1 because option 0 is "(Please select...)"
}
Thanks