How to Click Submit Button on keypress?

Ask a Question related to Coldfusion Flash Integration, Design and Development.

  1. #1

    Default How to Click Submit Button on keypress?

    Can anyone explain how I can 'click' a cfform ty[pe='submit' button by using the keyboard? I get focus but I have to click the button, pressing the enter key does nothing.
    rlafleur Guest

  2. Similar Questions and Discussions

    1. Submit button
      I have a web form with a few text fields some validataion and a submit button. When I click the submit bittin the serverside event does not...
    2. WWW::Mechanize click($button) not finding right button to click
      Based on wise advice from participants of this forum, I rewrote my web automation script using WWW::Mechanize. The script now successfully logs...
    3. Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl.
      Hello I have the following situation: (everything is dynamic (controls.add)) 1. Button.Init { WasButtonClickFired = true } 2....
    4. [PHP] using submit button and PHP-HELP
      thanx for your help, Ive got flu and all these small things seem to be escaping my eyes. I just want to ask you a small question: If i want this...
    5. value submit button
      You can get the button value use code below: <?php echo $_POST;?> <form method="post"> <input type="submit" name="submit" value="submit1">...
  3. #2

    Default Re: How to Click Submit Button on keypress?

    Anyone? I am having the same issue..
    michin11 Guest

  4. #3

    Default Re: How to Click Submit Button on keypress?

    Hi, I had the same problem and found a solution. In the cfinput field I just
    check with actionscript if the ENTER key is pressed. Of course this will only
    work in single line text-input fields. <cfinput type='text' name='Name'
    label='Name' onKeyDown='if(Key.isDown(Key.ENTER)) {submitForm()}'> I never
    knew that onKeyDown would work, but with IE6 it works fine. Please confirm if
    it works for you!

    Bartjan Meier Guest

  5. #4

    Default Re: How to Click Submit Button on keypress?

    Hi, I've tried your method and it works, but I still got some issues... I'm
    using your code on a login screen. The screen has some validation on blank
    username and password. If I hit enter without username/password, an alert box
    will show up. Everything's fine except when I hit enter more than once, the
    screen will seem to hang as the alert box won't go away no matter how many
    times I clicked on 'OK'. Is it only me that's having the problem?

    yitian Guest

  6. #5

    Default Re: How to Click Submit Button on keypress?

    I think this is a major shortcoming of Flash forms if the user must always use
    a mouse click to submit a form. I've tried the method here, which works pretty
    well, except that means putting it in every text field on the screen. And as
    I've found, this causes the Submit field to not be included in the form fields
    passed, so if you're performing code based on the value of the Submit field
    (where I have a tabbed form with three of them), that code will not work.

    mooresm Guest

  7. #6

    Default Re: How to Click Submit Button on keypress?

    We only used it on a form that has only 1 textfield to input, so there we have
    no problem. I tested the validation issue, and what's happening is that the
    form 'remembers' the last keypress and immediately submits the form again. You
    can always ignore the validation with username.enabled=false; before the
    submitForm(); command (if for exampleusername is required). But this will
    require to validate the form after it's been send. We use this when we have
    different forms within one form (each tab has a different role). Depending on
    the tab we disable validation for the fields of the other tabs. But I'm afraid
    this will not help in your case...

    Bartjan Meier Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139