[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><SPAN class=702154210-20072006><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 class=702154210-20072006><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 class=702154210-20072006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=702154210-20072006><FONT face=Arial size=2>I figured that was
an easy fix, instead of calling:</FONT></SPAN></DIV>
<DIV><SPAN class=702154210-20072006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=702154210-20072006><FONT face=Arial
size=2>$('input:not([@type=hidden])').each(function(i){}</FONT></SPAN></DIV>
<DIV><SPAN class=702154210-20072006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=702154210-20072006><FONT face=Arial size=2>i just
call:</FONT></SPAN></DIV>
<DIV><SPAN class=702154210-20072006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=702154210-20072006><FONT face=Arial
size=2>$('input:not([@type=hidden])|select').each(function(i){}</FONT></SPAN></DIV>
<DIV><SPAN class=702154210-20072006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=702154210-20072006><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 class=702154210-20072006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=702154210-20072006><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 class=702154210-20072006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=702154210-20072006>Thanks in
advance..</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=702154210-20072006>Tim</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN
class=702154210-20072006></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=702154210-20072006></SPAN><SPAN
class=702154210-20072006></SPAN></FONT></FONT> </DIV>
<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/