Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Going thrue all form elements
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Abdul-Rahman  
View profile  
 More options Jan 12 2008, 6:10 pm
From: Abdul-Rahman <abdulrahmanadv...@gmail.com>
Date: Sat, 12 Jan 2008 15:10:57 -0800 (PST)
Local: Sat, Jan 12 2008 6:10 pm
Subject: Going thrue all form elements
Hey guys,

I am trying to use the plugin of http://fluidproject.org/blog/2008/01/11/jquery-tabindex-plugin/
to set the tabindexes for my form. I am going through it by querying
it as following but it gives me back inputs, then the textareas, en
then the selects (and I would like the elements based on the
occurrence in stead as a collection of inputs, and then textareas, and
then selects.

This is the code I am using

$("form input, form textarea, form select").each(function(i){
  $(this).tabindex(i+1);
 });

does someone have a other solution?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott González  
View profile  
 More options Jan 13 2008, 9:14 am
From: "Scott González" <scott.gonza...@gmail.com>
Date: Sun, 13 Jan 2008 06:14:42 -0800 (PST)
Local: Sun, Jan 13 2008 9:14 am
Subject: Re: Going thrue all form elements
Use $(':input').each(...)

On Jan 12, 6:10 pm, Abdul-Rahman <abdulrahmanadv...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Abdul-Rahman  
View profile  
 More options Jan 13 2008, 9:58 am
From: Abdul-Rahman <abdulrahmanadv...@gmail.com>
Date: Sun, 13 Jan 2008 06:58:59 -0800 (PST)
Local: Sun, Jan 13 2008 9:58 am
Subject: Re: Going thrue all form elements
But that would skip all the textarea/select fields...

On Jan 13, 3:14 pm, "Scott González" <scott.gonza...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Abdul-Rahman  
View profile  
 More options Jan 13 2008, 10:00 am
From: Abdul-Rahman <abdulrahmanadv...@gmail.com>
Date: Sun, 13 Jan 2008 07:00:53 -0800 (PST)
Local: Sun, Jan 13 2008 10:00 am
Subject: Re: Going thrue all form elements
Oeps, Sorry, Works! thnx

On Jan 13, 3:14 pm, "Scott González" <scott.gonza...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Alsup  
View profile  
 More options Jan 13 2008, 3:51 pm
From: "Mike Alsup" <mal...@gmail.com>
Date: Sun, 13 Jan 2008 15:51:17 -0500
Local: Sun, Jan 13 2008 3:51 pm
Subject: Re: [jQuery] Re: Going thrue all form elements

> But that would skip all the textarea/select fields...

No it won't.  It will even include button elements.  :input is a
jQuery selection expression that finds all form controls.

Mike


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ariel Flesler  
View profile  
(1 user)  More options Jan 14 2008, 7:16 am
From: Ariel Flesler <afles...@gmail.com>
Date: Mon, 14 Jan 2008 04:16:48 -0800 (PST)
Local: Mon, Jan 14 2008 7:16 am
Subject: Re: Going thrue all form elements
:input will do what you need, but it's slow it's like a $('*') that
you then apply a complex filter.

You can use forms' attribute 'elements' to make it work faster. $
('form').map(function(){ return $.makeArray(this.elements); });

Ariel Flesler

On Jan 13, 6:51 pm, "Mike Alsup" <mal...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Alsup  
View profile  
 More options Jan 14 2008, 7:35 am
From: "Mike Alsup" <mal...@gmail.com>
Date: Mon, 14 Jan 2008 07:35:53 -0500
Local: Mon, Jan 14 2008 7:35 am
Subject: Re: [jQuery] Re: Going thrue all form elements

> :input will do what you need, but it's slow it's like a $('*') that
> you then apply a complex filter.

> You can use forms' attribute 'elements' to make it work faster. $
> ('form').map(function(){ return $.makeArray(this.elements); });

... unless your form contains <input type="image"... />  elements.
For some reason those elements are not included in the form's elements
array!

Mike


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ariel Flesler  
View profile  
 More options Jan 14 2008, 7:37 am
From: Ariel Flesler <afles...@gmail.com>
Date: Mon, 14 Jan 2008 04:37:49 -0800 (PST)
Local: Mon, Jan 14 2008 7:37 am
Subject: Re: Going thrue all form elements
Oh, I just learnt something new :)

Ariel Flesler

On 14 ene, 10:35, "Mike Alsup" <mal...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google