[Rails-spinoffs] Re: Tabulation with ENTER key

2007-02-20 Thread Janko Mivšek
Bon jour Cristophe, Christophe Porteneuve wrote: Hey Janko, Janko Mivšek a écrit : Anyway, because I have control on tabulation order on server I decided to let the server write a script to tab into a right next element. This is still better because I think have more control on

[Rails-spinoffs] Re: Tabulation with ENTER key

2007-02-20 Thread Jerod Venema
On 2/19/07, Christophe Porteneuve [EMAIL PROTECTED] wrote: Hey Jerod, I'm sorry if you felt bruised by my reply, I may have needed to word it more carefully. Ideas are indeed welcome (if you look at the archives, you'll probably acknowledge this), but when they do not provide enough of a

[Rails-spinoffs] Re: Tabulation with ENTER key

2007-02-19 Thread Janko Mivšek
Hi Cristophe, Thank you for that trick! As beginner in JavaScript didn't know that I can use tabIndex from JS to find a next element to tab into. Anyway, because I have control on tabulation order on server I decided to let the server write a script to tab into a right next element. This is

[Rails-spinoffs] Re: Tabulation with ENTER key

2007-02-19 Thread Janko Mivšek
Hi Marius, So I was a bit too naive to expect a simple solution for that problem! Anyway, because of my limited JS knowledge I decided not to go deeper and rather let the server to compose a JS for tabulation. So far it works well and for me a problem is solved. But still .. :) Thanks and

[Rails-spinoffs] Re: Tabulation with ENTER key

2007-02-19 Thread Christophe Porteneuve
Hey Janko, Janko Mivšek a écrit : Anyway, because I have control on tabulation order on server I decided to let the server write a script to tab into a right next element. This is still better because I think have more control on tabulation than from JS. I have *no idea* what you mean.

[Rails-spinoffs] Re: Tabulation with ENTER key

2007-02-19 Thread Jerod Venema
This is only set up to work in FF, and only tested in FF2, but it will auto-tab to the next input field. It may need some more work if you're doing more deeply nested elements(ie, you may want to use some root element instead of element.parentNode), but it should be a decent starting point.

[Rails-spinoffs] Re: Tabulation with ENTER key

2007-02-19 Thread Christophe Porteneuve
Hey Jerod, Jerod Venema a écrit : This is only set up to work in FF, and only tested in FF2, but it will auto-tab to the next input field. It may need some more work if you're Actually it won't in a valid strict HTML document: form fields are not usable directly in the form element, they

[Rails-spinoffs] Re: Tabulation with ENTER key

2007-02-18 Thread Christophe Porteneuve
Hey Janko, If you're fully in control of your HTML, you can leverage the tabindex attribute, and create a generic handler, something like: form id=inputForm... ... input type=text... tabindex=1 / ... input type=text... tabindex=2 / ... /form And then in your JS (untested, but should

[Rails-spinoffs] Re: Tabulation with ENTER key

2007-02-18 Thread Marius Feraru
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Janko Mivšek wrote: It would be much nicer to just replace KEY_RETURN with KEY_TAB event. Anyone knows, how to do that? I tried with event.keyCode = Event.KEY_TAB Yeah, in an ideal world this would be sweet ;-) As you may already know, according