Stopping enter from submitting a form

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

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.

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,