Click to See Complete Forum and Search --> : Contact form - switch fields with return key


King Dingeling
04-06-2004, 02:47 AM
Hey guys!

I've got a little problem with a contact formular:

I am sitting here at work and one of our customers wants to jump to the next formfield by using the return key. Since the form usually is sent by doing so I guess I have to find a way to overrun this function and replace it with the command to switch to the next field...

Any ideas? =)

Thanks aalot in advance...

King Dingeling

Kor
04-06-2004, 05:26 AM
Tell your customer that is not one of his brightest ideea... :D

1. Everybody with minimum computer skills knows that TAB is the key to switch through inputs. Why change it with ENTER?

2. On the other hand, even if is possible to kapture a key and fire a function (this case to focus() the objects) there are some special keys whose behaviour can not be changed, such as ENTER, F1, TAB, Alt+F4, WINDOW (or APPLE)key combination, and so on, because they are the OS short-cuts not the HTML page...

That means that you may switch through inputs when pres ENTER, but after that ENTER will action the submit anyway, I am affraid that you can not stop this, at least according to my knowledges.

King Dingeling
04-06-2004, 06:02 AM
That's about what I thought, I was just going for a try... =)

Thank's for your support!

KingD