Most browsers simply send the header "submit: true" when the enter key is pressed and the cursor is in a form field. As such, ActionEvents won't work when this happens because they rely on the submit field's name to determine which ActionEvent to call. In your app, the enter-submitted header contains the standard "submit" instead of "evenSubmit_doLeroyCheck".
The best thing to do would be to capture the keypress event and filter out the enter key to disable that functionality. If you prefer to keep the functionality, you must have the event "click" the correct submit button for you when the keycode equals the enter-keycode. Google for capturing the onkeypress event for info on how to do capture key presses. You should also try using a packet sniffer to see more clearly what I am talking about (I like IRIS in windows). Chris -----Original Message----- From: Pat Ryan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 1:26 PM To: Turbine Users List Subject: ActionEvent / eventSubmit_doStuff and the Enter Key Hi, We are trying to use ActionEvents in our Jetspeed app. We are setting the form action to be an action class that has a doLeroycheck method (don't ask! ;-). The problem is that, if we submit the form by clicking the submit button, the doLeroycheck is called, but if the cursor is in the text field and the Enter Key is pressed, the doLeroycheck is not called, but the buildNormalContext (the normal Jetspeed Portlet call) is called. Anybody know if this an IE problem? Turbine problem? Or our problem (easiest to fix!)? <form action="$link.setAction("portlets.LeroyAction")" method=POST> ## Load the intake group for this form #set ($leroyGroup = $intake.get("LeroyGroup").Default) #if ( !$leroyGroup.Username.isValid() ) Data Validation Failed: $leroyGroup.Username.Message<br> #end ## Print the input field with prior data if any enter a name:<input value="$!leroyGroup.Username" name="$leroyGroup.Username.Key" maxlength="25" type="text"><br> ## Print the submit button with ActionEvent <input type="submit" name="eventSubmit_doLeroycheck" value="Do Leroy Check"> ## Declare Intake Group (required) $intake.newForm() $intake.declareGroup($leroyGroup) </form> --Pat -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
