Thanks for the reply.  I wound up using:

function BasketItemCount()
{
  var totitems=0;
  var currentRow = 1;
  for (; currentRow lte session.basket.RecordCount; currentRow = currentRow + 1)
  {
    totitems = totitems + session.basket["Quantity"][currentRow];
  }
  return totitems;
}

Regards,

Howie

----- Original Message ----- 
From: "junkMail" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, March 16, 2002 4:29 PM
Subject: Re: UDF question


> Try something like this...
> 
> function BasketItemCount()
> {
>   var totitems=0;
>   for (i = 1; i lte session.basket.recordcount;  i = i + 1) {
>     totItems = totItems + session.basket.itemQty[i];
>   }
>   return totitems;
> }
> 
> Keith Meade
> [EMAIL PROTECTED]
> 
> ----- Original Message -----
> From: "Howie Hamlin" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Saturday, March 16, 2002 2:53 PM
> Subject: UDF question
> 
> 
> > Can I reference a query from within a UDF?  I'm building a new shopping cart
> that has the items and quantities in a session query
> 
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to