8 Replies Latest reply on Jan 10, 2012 11:02 PM by abcNocturn

    Using event as keypress

    abcNocturn Level 1

      Hi everybody,

      I'm new to Javscript in Acrobat, but I looked through some tutorials and the scripting guide.

      I need to use a Javascript when someone is entering a text into a textfield.


      I found in the API the event "event.keyDown", but I don't know where and how I can use it on one textfield.


      Does anybody have an example ?


      I need something like this :

      var field = this.getField("testfield")

      if ( event.keyDown on field ) {     // This is the part where I am struggeling -.-

           app.alert ( field.value ) ;