3 Replies Latest reply on Nov 4, 2013 3:03 AM by Tryin hard

    Smart phone issues with combo box

    Tryin hard

      My combo box works as it should on the pc but when i use it on my smart phone (iphone) with the new adobe reader it does nothing. Can any one shed some light on my issue, is it with my script


      I have a combo box with 3 selections and a message returned from the assigned value of the menu item


      Here is my script:


      I have put this in the calculate  - using custom calculation script


      (function () {
      if (getField("dropmn_safety").value ===2) {
      if (getField("dropmn_safety").value ===3) {
      if (getField("dropmn_safety").value ===1) {
      event.value = "Please proceed with form";






        • 1. Re: Smart phone issues with combo box
          Tryin hard Level 1

          Ok so I also tried this one with the same result on my phone:


          / Custom Keystroke script for dropdown

          if (!event.willCommit) {

              getField("Text1").value = event.changeEx;



          values were the messages instead of the values this time.

          • 2. Re: Smart phone issues with combo box
            try67 MVP & Adobe Community Professional

            There are several possible issues that cause the problem:

            1. JS support on mobile devices (espcially iOS ones) is quite poor, and worse yet, not documented. So things that work on a desktop computer or laptop often do not work on mobile devices, for no apparant reason.


            2. Your code is not entirely correct, and you're using some "risky" methods.

            For starters, in the drop-down field, I would recommend using the validation or keystroke events instead of the calculation event, and then accessing the value via event.value, not via getField().value ...

            Also, your method of comparing values is problematic. The comparison operator you're using ("===") is a strict one, meaning it will only return true if both sides are of the same value AND of the same type. The standard comparison operator ("==") attempts to convert one variable to the type of the other, if possible, and then makes the comparison. So it's possible that even though the values are the same, the value of the field might be a String and the value you're comparing it to is a Number, so the comparison returns false. To avoid that you should either explicitly convert the field's value to a Number object, and maybe switch to the less-strict operator.

            • 3. Re: Smart phone issues with combo box
              Tryin hard Level 1

              Ok so the keystroke does not work on the smart phone, unless there is some wrong with the keystroke code. I have tried event.value instead of event.changeEx but this does some thing wierd with the menu by slecting the next option.



              Reducing the number of equals works but the thrid if clause does not work so I dont know where to go from here. I keep searching but if any one has any ideas im all ears