Hi, 

I have a problem where I am processing dates and cross checking them
across two Arrays. One array holds user selected dates, the other
holds dates which are disabled.

The loop I have at the minute checks them OK but outputs an Alert box
for every date which is the same. 

How can I adjust the code so that only one alert box is displayed? 
        
CODE SEGMENT

var i:int = 0;

while ( startDate <= endDate ){         

for (var a:int = 0; a <= disabledDates.length; a++) {

stayLength[i] = year.toString() + "," + month.toString() + "," +
startDate.toString();   

if ( disabledDates[a] == stayLength[i] ) {

Alert.show("Date Overbooked!", "Sorry", Alert.OK);}     

}       
        
i++;
startDate++;

}



Reply via email to