Dan G. Switzer, II wrote:
>
> I'll probably play around w/developing a plugin for this that will allow
> you
> to programmatically go between next/prev form fields.
>
Sounds good. BTW, I meant the tabIndex property, not tabOrder.
If you don't set tabIndex I believe it goes in HTML source orde
t: Wednesday, January 10, 2007 5:42 PM
>To: 'jQuery Discussion.'
>Subject: Re: [jQuery] Automatically advancing to next form element...
>
>> Does anyone have code that will automatically advance the
>> focus the next form element in the DOM and if it's the last
>&
> Does anyone have code that will automatically advance the
> focus the next form element in the DOM and if it's the last
> form element, cycle to the first form field again?
Have you looked at setting tabOrder on the fields? That doesn't require any
Javascript at all. Or were you looking to have
Dan G. Switzer, II schrieb:
> Does anyone have code that will automatically advance the focus the next
> form element in the DOM and if it's the last form element, cycle to the
> first form field again?
>
Some untested code:
var elements = $($("#myform")[0].elements);
var pointer = 0;
function
Does anyone have code that will automatically advance the focus the next
form element in the DOM and if it's the last form element, cycle to the
first form field again?
-Dan
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/