Hey all, I''m working on a rails app that will be accepting input from a wide array of brandless barcode scanners. Is there anyway of making the return key tab to the next field instead of submitting the form? I know this is more of a javascript thing, but I just can''t get it solved. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 16 June 2010 21:20, Brent Jameson <brentjameson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey all, > > I''m working on a rails app that will be accepting input from a wide > array of brandless barcode scanners. Is there anyway of making the > return key tab to the next field instead of submitting the form? I > know this is more of a javascript thing, but I just can''t get it > solved. >Did you try google? A search for javascript enter tab yielded many links that look potentially useful. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I just read this up in a JS book. The submit button has actually 2 events happening sequentially. The first one is an onClick and the second one an onSubmit. Both can return false and stop the execution of the action. If onClick returns false onSubmit will not be executed. I guess you could control your flow of execution based on what area of the page has the focus and only submit the form when you''re really done and switch focus to the next area of your page based on where you are when the submit button is pressed. On Jun 16, 4:20 pm, Brent Jameson <brentjame...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey all, > > I''m working on a rails app that will be accepting input from a wide > array of brandless barcode scanners. Is there anyway of making the > return key tab to the next field instead of submitting the form? I > know this is more of a javascript thing, but I just can''t get it > solved.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Brent Jameson wrote:> Hey all, > > I''m working on a rails app that will be accepting input from a wide > array of brandless barcode scanners. Is there anyway of making the > return key tab to the next field instead of submitting the form? I > know this is more of a javascript thing,You are correct.> but I just can''t get it > solved.Then I would suggest asking on a JavaScript list. You''ll get better answers. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.