
can any one tell me why this switch statement will only work once
can any one tell me why this switch statement will only work once through?
for example carrierArray = FEDEX,FEDEX-GROUND it will only execute FEDEX
then go right to the default of the switch for FEDEX-GROUND
var carrierArray = String(this.Carriers).toUpperCase().split(",");
for(var i=0; i<carrierArray.length; i++) {
Response.Write(carrierArray[i] + " looping... <br>")
switch(String(carrierArray[i]))
{
case "UPS":
this.GetUPS();
break;
case "FEDEX":
Response.Write("Calling Express<br>");
this.GetFedEx("Express");
break;
case "FEDEX-GROUND":
Response.Write("Calling Ground<br>");
this.GetFedEx("Ground");
break;
case "FEDEX-HOME":
Response.Write("Calling Home<br>");
this.GetFedEx("Home");
break;
default:Response.Write("died on: " + carrierArray[i] )
}
}
--
JScavitto