[jQuery] Re: Please help: How to simulate a Tab key press with jQuery

2007-09-16 Thread Theodore Ni
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, ju

[jQuery] Re: Please help: How to simulate a Tab key press with jQuery

2007-09-15 Thread Dylan Verheul
On 9/15/07, Mark <[EMAIL PROTECTED]> wrote: > 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. Which autocomplete

[jQuery] Re: Please help: How to simulate a Tab key press with jQuery

2007-09-15 Thread Richard D. Worth
Try these three DOM methods in concert: http://developer.mozilla.org/en/docs/DOM:document.createEvent http://developer.mozilla.org/en/docs/DOM:event.initKeyEvent http://developer.mozilla.org/en/docs/DOM:element.dispatchEvent If you're able to get it to work, the event that gets generated and disp

[jQuery] Re: Please help: How to simulate a Tab key press with jQuery

2007-09-15 Thread Erik Beeson
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, a