Well you chould start at the back
something like (not real code!!)
currentelement = documents.forms[0].elements.length;
currentobj= documents.forms[0].elements[arraylen];
while(currentobj["id"] != "AA01" )
{
dosomething(currentobj);
currentelement--;
currentobj= documents.forms[0].elements[currentelement];
}
or something ...!! Haven't done much DOM stuff in JavaScript recently !
Justin
> -----Original Message-----
> From: Aidan Whitehall [mailto:[EMAIL PROTECTED]]
> Sent: 09 January 2003 12:18
> To: [EMAIL PROTECTED]
> Subject: RE: [ cf-dev ] OT: JS form question
>
>
> > getElementById("AA01") will return the object
> >
> > You can then get and set properties
>
> Thanks Justin.
>
> Is there then a way to get the position of that object in the
> forms[0].elements array though? I want to be able to loop from that
> element position onwards to save having to loop through every element in
> the form (which is taking forever on forms with loads of checkboxes).
>
> My JS is ropey at best, so if you see an obviously better way you'd do
> this, please say.
>
> --
> Aidan Whitehall <[EMAIL PROTECTED]>
> Macromedia ColdFusion Developer
> Fairbanks Environmental Ltd +44 (0)1695 51775
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
>
>
>
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]