I have a ModalWindow containing a class extending Panel. On the Panel I have a class extending Form. The Form contains a custom AjaxButton which overrides protected void onSubmit(AjaxRequestTarget target, Form<?> form).
When I click this button it retrieves text from a PasswordField and validates it. It displays an error message on my Panel's FeedbackPanel in the event of en error; otherwise it closes the ModalWindow and refreshes the calling page. This works flawlessly when I use the mouse button to click my AjaxButton. It also works in FireFox3 when I use the enter button. But in IE7 when I use the enter button instead of the mouse, it gives me a 404 error in my browser and the modal window disappears without running the onSubmit function. Any suggestions on how to make this work for IE7? I would like to use a ModalWindow if at all possible instead of popping up another page. Here is my HTML: <html xmlns:wicket="http://wicket.sourceforge.net/" lang="EN-US"> <wicket:panel> <form wicket:id="form" action=""> <table width="75%" cellpadding="5" cellspacing="0" border="0" align="center"> <tr> <td colspan="2"> <div class="formFeedback" wicket:id="feedback"></div> Password: <input type="password" wicket:id="password" name="Password"></input> </td> </tr> <tr> <td align="center"> <input type="submit" wicket:id="okButton" value="Delete"/> </td> <td> # Cancel </td> </tr> </table> </form> </wicket:panel> </html> ------------- Here is my AjaxButton which I add to my Form object. add(new AjaxButton("okButton", this) { @Override protected void onSubmit(AjaxRequestTarget target, Form<?> form) { if(form.get("password") != null && (PasswordTextField)form.get("password") != null) { String userEnteredPassword = ((PasswordTextField)form.get("password")).getInput(); if(userEnteredPassword != null && !userEnteredPassword.equals("") && validPassword(userEnteredPassword)) { //Delete successful; closing window window.close(target); return; } } error("Invalid password"); } --------------------- Thanks. -- View this message in context: http://www.nabble.com/IE7-ignores-AjaxButton-onSubmit-when-I-use-the-keyboard-enter-key-tp20234862p20234862.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]