10 Replies Latest reply on Jun 20, 2011 7:31 AM by jck_drmjn

    switch - syntaxError: missing

    jck_drmjn Level 1

      var mainDD = this.getField("Dropdown1");

       

      Var inputVal = this.getField("Text1").value;

      Var outputVal = this.getField("Text2").value;

       

      switch (mainDD.value)

       

      {

       

          case "Ne to Nm":

       

              outputVal=1.693*inputVal;

       

              break;

       

          case "Nm to Ne":

       

              outputVal=0.59*inputVal;

       

              break;

       

       

          default:

       

              break;

       

       

       

      I've placed this code in document level. Hoever, SyntaxError: missing: before statement 3 is shown.

       

      Where are I making a mistake?