2 Replies Latest reply on Sep 18, 2008 2:44 AM by (Colin_Hackett)

    List box selection test with app alert

      Hi, Struggling again!
      Any help appreciated. I have a simple list box with 6 values; 1-5 and a space for the default. I am wanting to test if the user selects 1 then the app alert says "Correct", if user selects 2,3,4,5 app alert says "Incorrect", if user selects the space no alert. I have tried this but its not working. Also please let me know where to place the script.

      var a = this.getField("Combo Box1");

      if (a.value == 1)
      {app.alert("Correct");}

      if ((a.value == 2) || (a.value == 3) || (a.value == 4) || (a.value == 5))
      {app.alert("Incorrect");}

      if (a.value == " ");
      a.setFocus();