Moreover, you can make sure each of your form elements has a tabindex
attribute, and you can find the element with the next tabindex and focus it.

Ted

On 9/15/07, Erik Beeson <[EMAIL PROTECTED]> wrote:
>
> Can you not just focus the next field? Assuming your fields are all at the
> same level, just:
>
> $(/* current component
> */).next('input,select,textarea,button')[0].focus();
>
> Does that makes sense?
>
> --Erik
>
>
> On 9/14/07, Mark <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi,
> > I have a very large and complex form, and I am using some autocomplete
> > components, and I need when user selects one item in the autocomplete
> > option list, focus automatically go to the next component, like
> > pressing the tab key.
> >
> > So, I am trying to simulate a tab key press on a component, with no
> > success. I mean, sending a tab key to a component, just like if
> > someone had pressed it.
> >
> > Using $item.keypress() or $item.keydown() there is no way to add the
> > needed keyCode=9
> >
> > I had no luck using trigger('keydown',[{keyCode:9}]); either, I dont
> > know if I am sending right the second parameter, but seems that no
> > event is called at all.
> >
> > If anyone know how to this, please help, it is really needed to finish
> > this project.
> >
> > Thanks in advance,
> >
> > Bye
> > Mark
> >
> >
>


-- 
Ted

Reply via email to