11 Replies Latest reply on Mar 18, 2016 7:35 AM by gkaiseril

    Why does the Javascript that controls certain text fields not re-render immediately?

    jdl169

      I am creating a form in Acrobat XI Pro.

       

      I made several text fields asking for Room Number. Other text fields create sentences based on those Room Number inputs. For instance, if a user enters a room number into the text box "Room1", the code for "TextBox1" is the following:

       

      var roomnumber = getField("Room1").value;

      if (roomnumber != "") getField("TextBox1").value= "Enter square footage of Room "+roomnumber+" here:";

      else getField("TextBox1").value="";

       

      I'm finding that TextBox1 does not continuously re-render as the text in "Room1" changes. If I change the entry in Room1, TextBox1 stays unchanged for a while. After I click on another box in my form and then out again, the Javascript for TextBox1 "catches up" and shows the correct text.

       

      I know my code is correct, because EVENTUALLY the text boxes behave correctly. Shouldn't all text fields be constantly re-calculated any time someone interacts with the form?