Hi,

I have a form that has a single text field and an ajax button.
In FF when I click on the button or hit return key the onSumit of the
ajaxButton is called.
In IE when I click on the button the onSubmit of the ajaxButton is called.
However
In IE (as you may know) if I hit the return key it submits the form
and the form's onSubmit method is be called instead of the ajaxButton
so the page just refreshes.
If I add the onSubmit to the form, in FF if I click on the button ,
first the onSubmit of the form is called, then the ajaxButton
onSubmit, and we end up with double the submits

Aside from disabling the return key via javascript - not really an
option as its just bad usability for us - any suggestions on how to
handle this in a more elegant way?

For the moment I've used form.isSubmitted() in the ajaxButton
onSubmit, but it means I have to duplicate some of the code between
the 2 onSubmits to control ajaxrequestTarget .
thanks
Wayne






www.glasscubes.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to