Does this work with Chrome? It seems like I've seen Chrome refuse to use the enter key when there is more than one submit on the page.<br><br>-Randy<br><br><div class="gmail_quote">On Mon, Mar 8, 2010 at 1:55 AM, Pierre Rineau. <span dir="ltr"><<a href="mailto:pierre.rineau@makina-corpus.com">pierre.rineau@makina-corpus.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">On Wed, 2010-03-03 at 14:55 -0500, Andrew Berry wrote:<br>
> On 2010-03-03, at 6:01 AM, Pierre Rineau. wrote:<br>
><br>
> > Found my own solution, a jQuery based script that searchs for a specific<br>
> > class on form input elements and trick the browser by preprending a<br>
> > cloned version of the default submit button on top of the form.<br>
><br>
> When I've dealt with this in the past, I've caught the input event and fired the appropriate action. How does that compare to your solution?<br>
><br>
> --Andrew<br>
<br>
</div></div>I read some posts saying that catching the enter key can be hard to do<br>
with some browsers. I finally choose another solution: copying the<br>
default button DOM element on top of the form, but hidden in order to be<br>
fully transparent for the end user. It seemed to be the nicest solution<br>
because it does not requires your javascript to add any events on<br>
buttons and it let the browser do its job.<br>
<br>
See <a href="http://drupal.org/project/default_submit" target="_blank">http://drupal.org/project/default_submit</a><br>
<br>
Regards,<br>
<font color="#888888">Pierre.<br>
<br>
<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Randy Fay<br>Drupal Development, troubleshooting, and debugging<br><a href="mailto:randy@randyfay.com">randy@randyfay.com</a><br>+1 970.462.7450<br><br>