[jQuery] Retreiving form elements.. wrong order :(

[jQuery] Retreiving form elements.. wrong order :(

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.3790.2666" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=834090912-20072006><FONT face=Arial
color=#0000ff size=2>No luck with that,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834090912-20072006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834090912-20072006><FONT face=Arial
color=#0000ff size=2>I now had to change it from:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834090912-20072006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834090912-20072006><FONT face=Arial
color=#0000ff
size=2>$('input:not([@type=hidden])|select').each(function(i){<BR></FONT></SPAN><SPAN
class=834090912-20072006><FONT face=Arial color=#0000ff
size=2>too:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834090912-20072006><FONT face=Arial
color=#0000ff
size=2>$('//form/*:not([@type=hidden])').each(function(i){</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834090912-20072006><FONT face=Arial
color=#0000ff size=2>"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834090912-20072006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834090912-20072006><FONT face=Arial
color=#0000ff size=2>but now i have to add another if statement that checks if
the type='text or select-one.. couldn't get it to work in a
filter..</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834090912-20072006><FONT face=Arial
color=#0000ff size=2>So i got it working, but its not a good
solution..</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834090912-20072006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834090912-20072006><FONT face=Arial
color=#0000ff size=2>ps: i left textarea out on purpose if anyone
was wondering :)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834090912-20072006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> discuss-bounces@jquery.com
[mailto:discuss-bounces@jquery.com] <B>On Behalf Of </B>Blair
McKenzie<BR><B>Sent:</B> donderdag 20 juli 2006 13:16<BR><B>To:</B> jQuery
Discussion.<BR><B>Subject:</B> Re: [jQuery] Retreiving form elements.. wrong
order :(<BR></FONT><BR></DIV>
<DIV></DIV>You could try "," instead of "|". It may be exactly the same, but
it's easy to test. :)<BR><BR>Blair<BR><BR>
<DIV><SPAN class=gmail_quote>On 7/20/06, <B class=gmail_sendername>Boonstra,
T.H. (Tim)</B> <<A
href="mailto:tim.boonstra@tno.nl">tim.boonstra@tno.nl</A>> wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV>
<DIV><SPAN><FONT face=Arial size=2>I just wrote a function to set the focus on
the next input element in the document with hidden elements in mind. It took
me a while but i managed it :)</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2>However i came across a big problem, i
wrote it by selecting all input elementes that weren't of the type hidden.
This worked perfect, but ofcourse there aren't only input elements, there are
also SELECT elements. </FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial size=2>I figured that was an easy fix, instead of
calling:</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial
size=2>$('input:not([@type=hidden])').each(function(i){}</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial size=2>i just call:</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial
size=2>$('input:not([@type=hidden])|select').each(function(i){}</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial size=2>However this is where thing go wrong, the
select elements are added at the TOP of the array ;( because my function
depends on the order the elements are in it always thinks the next element is
the first input it comes across, which isn't true..</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial size=2>How can i fix the selector so that it keeps
the order the elements are found in the document??</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN>Thanks in
advance..</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN>Tim</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT
size=2><SPAN></SPAN><SPAN></SPAN></FONT></FONT> </DIV><BR>This e-mail and
its contents are subject to the DISCLAIMER at <A
title=http://www.tno.nl/disclaimer/email.html
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://www.tno.nl/disclaimer/email.html"
target=_blank>http://www.tno.nl/disclaimer/email.html</A><BR></DIV></DIV><BR>_______________________________________________<BR>jQuery
mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:discuss@jquery.com">discuss@jquery.com</A><BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://jquery.com/discuss/"
target=_blank>http://jquery.com/discuss/</A><BR><BR><BR></BLOCKQUOTE></DIV><BR>
<BR>
This e-mail and its contents are subject to the DISCLAIMER at http://www.tno.nl/disclaimer/email.html<BR>
</BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/