Frank Schummertz <[EMAIL PROTECTED]> wrote:
> Michael Peters wrote:
>> have are inputs of type 'button' this doesn't happen. Is there any
>> way to trap that 'Enter' event (without having to try and trap key
>> press events and fake 
> 
> You can use <button type=submit">test</button> or is this a
> misunderstanding on my side now?

or, an <input type="image" src="transparent-1pixel.gif" /> 

the "image input" is functionally equivalent to <input type="submit"> in that 
it acts as a submit button and also gets activated when the enter key is 
pressed.  

Although it's a bit hackish to use an invisible image for a submit button, 
these image-inputs work in all browsers -- they're not IE specific.  I have 
resorted to using them to enable users filling out long forms to just press 
enter to submit it.

hth, 

-dave


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to