Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] nested "for" statements


  • From: javascript@xxxxxxxxxx (Bill Marriott)
  • Subject: [Javascript] nested "for" statements
  • Date: Wed, 29 May 2002 19:18:50 -0700

Thanks very much Laurent, I'll give it a go!

Bill


----- Original Message -----
From: "Muchacho, Laurent (TWIi London)" <LMuchacho@xxxxxxxx>
To: <javascript@xxxxxxxxxx>
Sent: Wednesday, May 29, 2002 2:18 AM
Subject: RE: [Javascript] nested "for" statements


> Hi Bill
>
> That possible but you need to use a differente variable for the nested
loop
>
> for(var i=0;i<object.length;i++){
> alert(object[i]);
> for(var j=0;j<object2.length;j++){
> alert(object2[j])
> }
>
> }
>
> Laurent
>
>
>
> -----Original Message-----
> From: Bill Marriott [mailto:bill.marriott@xxxxxxxxxxxxxxx]
> Sent: 30 May 2002 02:47
> To: javascript@xxxxxxxxxx
> Subject: Re: [Javascript] nested "for" statements
>
>
> Hi Everyone,
>
> I'm trying to get nested "for" statements to run in order to get the
> selected options from a number of  multiple select boxes. See code below.
> Does anyone know if it isn't possible? At present it only runs for the
first
> select box.
>
> regards
>
> Bill
>
> for(i=1;i<=document.Crystal.NumOfParM.value;i++)
>    {
>      var ObjM = document.getElementById("paraM" +i);
>      if (ObjM != "" || ObjM != null)
>       {
>         for (var i=0, l=ObjM.options.length;i<l;i++)
>            {
>              if (ObjM.options[i].selected)
>                 {
>                   valSF = valSF + "AND" + ObjM.options[i].value;
>                 }
>            }
>       }
>    }
>
>
> _______________________________________________
> Javascript mailing list
> Javascript@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
> DISCLAIMER - The preceding e-mail message (including any attachments)
> contains information that may be confidential, may be protected by the
> attorney-client or other applicable privileges, or may constitute
non-public
> information.  It is intended to be conveyed only to the designated
> recipient(s) named above.  If you are not an intended recipient of this
> message, or have otherwise received it in error, please notify the sender
by
> replying to this message and then delete all copies of it from your
computer
> system.  Any use, dissemination, distribution, or reproduction of this
> message by unintended recipients is not authorized and may be unlawful.
The
> contents of this communication do not necessarily represent the views of
> this company.
> _______________________________________________
> Javascript mailing list
> Javascript@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript