[jQuery] Re: to change tab for enter

2007-04-18 Thread Fabyo
d check if the array > returned is empty and wrap back to 1. > > - Original Message > From: Roberto Ortelli <[EMAIL PROTECTED]> > To: jquery-en@googlegroups.com > Sent: Monday, April 16, 2007 1:18:15 PM > Subject: [jQuery] Re: to change tab for enter > > &

[jQuery] Re: to change tab for enter

2007-04-17 Thread Ariel Jakobovits
tabIndex + "]").focus(); return false; } }); and don't forget that you could make it more robust and check if the array returned is empty and wrap back to 1. - Original Message From: Roberto Ortelli <[EMAIL PROTECTED]> To: jquery-en@googlegroups.com Sent: Mon

[jQuery] Re: to change tab for enter

2007-04-17 Thread Fabyo
Included for list forms: http://docs.jquery.com/Plugins#Forms Fabyo wrote: > > Thanks > very much thanks > > > BethaSidik wrote: >> >> I've created the plugin for this purposes, name is enter2tab plugin. >> This plugin created for my project, that develop a web application that >> behave

[jQuery] Re: to change tab for enter

2007-04-17 Thread Fabyo
Thanks very much thanks BethaSidik wrote: > > I've created the plugin for this purposes, name is enter2tab plugin. > This plugin created for my project, that develop a web application that > behave like normal window application, which can use enter to move on the > next field. > > The plugi

[jQuery] Re: to change tab for enter

2007-04-16 Thread BethaSidik
I've created the plugin for this purposes, name is enter2tab plugin. This plugin created for my project, that develop a web application that behave like normal window application, which can use enter to move on the next field. The plugin needs you to explicitly add a tabindex for every element

[jQuery] Re: to change tab for enter

2007-04-16 Thread Fabyo
Thanks perfect, perfect, perfect thanks Robert Roberto Ortelli wrote: > > > Just a first attempt, I don't like it, and you need to add a few lines > of code ; ) > > $("[EMAIL PROTECTED]").bind("keydown",function(e){ > if (e.keyCode == 13) { > tabIndex = parseFloat($(this).attr("

[jQuery] Re: to change tab for enter

2007-04-16 Thread Roberto Ortelli
Just a first attempt, I don't like it, and you need to add a few lines of code ; ) $("[EMAIL PROTECTED]").bind("keydown",function(e){ if (e.keyCode == 13) { tabIndex = parseFloat($(this).attr("tabindex")) + 1; $("[EMAIL PROTECTED]")[tabIndex].focus(); return false; } }

[jQuery] Re: to change tab for enter

2007-04-16 Thread Fabyo
[b]onsubmit[/b] = ( is use Unobtrusive JavaScript Leonardo K wrote: > > Start tabindex with number 1. > > Without label: > > >Campo 1: >Campo 2: >Campo 3: >Campo 4: >Campo 5: > > > > With label: > > >Campo1: name="campo1" >

[jQuery] Re: to change tab for enter

2007-04-16 Thread Leonardo K
Start tabindex with number 1. Without label: Campo 1: Campo 2: Campo 3: Campo 4: Campo 5: With label: Campo1: Campo2: Campo3: Campo4: Campo5:

[jQuery] Re: to change tab for enter

2007-04-16 Thread Fabyo
It functioned perfect, but it would have as to function without using labels? my formu: Campo 1: Campo 2: Campo 3: Campo 4: Campo 5: Roberto Ortelli wrote: > > > Fabyo, > pay attention, the solution below only works if you have a form

[jQuery] Re: to change tab for enter

2007-04-16 Thread Fabyo
not function exemple is not corret http://fabyoguimaraes.com/jquery/troca.html thanks Roberto Ortelli wrote: > > > Fabyo, > pay attention, the solution below only works if you have a form like that: > > One > Two > Three > > >> $("[EMAIL PROTECTED]").bind("keydown", function(e){ >>

[jQuery] Re: to change tab for enter

2007-04-16 Thread Roberto Ortelli
Fabyo, pay attention, the solution below only works if you have a form like that: One Two Three $("[EMAIL PROTECTED]").bind("keydown", function(e){ if (e.keyCode == 13) { $(this).next().focus(); return false; }

[jQuery] Re: to change tab for enter

2007-04-16 Thread Karl Swedberg
Hi Fabyo, You might have to add return false; after the third line so that the "Enter" key doesn't submit the form. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Apr 16, 2007, at 8:20 AM, Fabyo wrote: $("[EMAIL PROTECTED]").keydown(funct

[jQuery] Re: to change tab for enter

2007-04-16 Thread Roberto Ortelli
Try this: $("[EMAIL PROTECTED]").bind("keydown", function(e){ if (e.keyCode == 13) { $(this).next().focus(); return false; } }); 2007/4/16, Fabyo <[EMAIL PROTECTED]>: $("[EMAIL PROTECTED]").keydown(function