1 Reply Latest reply on Aug 9, 2006 10:23 AM by jtan

    The "Enter Key"

      After building a form to collect data - the user cannot use the keyboard's "Enter Key". Why? Even if the user tabs over the "Submit Button" and hits "enter" on the keyboard - nothing happens. The user must move the mouse over the "Submit" button and left click.

      What code do I have to include to perform this user input?
      Thanks for any ideas.
        • 1. Re: The "Enter Key"
          jtan Level 1
          The Button is designed to be pressed using the space bar. If you want the Submit button pressed whenever a user presses Enter, then, set the defaultButton property on your Container that the Button is in. Here is the ASDoc on defaultButton:

          defaultButton property
          defaultButton:IFlexDisplayObject [read-write]
          The Button control designated as the default button for the container. When controls in the container have focus, pressing the Enter key is the same as clicking this Button control.