That's they way I thought I was doing it before, and the first thing I
tried.  The code from that phase, early on, is long gone, but I was trying
to loop through all of the "quantity_num" variables ... though I was doing
"quantity;num" ... which came out something like "quantity;1"

I just thought of something else to try and so far, it's working.

I have my session array/structures.  I make each input field it's own form
-- with a submit onChange. I then update the quantity for the array item at
that array position.  That seems to be working.

Now I've just got to submit the whole form, but since all items are stored
in a session array structure, I'm really not passing any data with the
"checkout" button, so this shouldn't be a problem.

H.



Howard Owens
Internet Operations Coordinator
www.insidevc.com
[EMAIL PROTECTED]
AIM: GoCatGo1956


> -----Original Message-----
> From: Jon Hall [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, December 11, 2001 5:28 PM
> To:   CF-Talk
> Subject:      Re: FORM with changing quanties for multiple items
> 
> Where are you getting the jit compilation error exactly? On the form page,
> or the action page? What code causes it...
> Naming the form fields the item numbers it the easiest solution, or
> something like qty_#stocknumber# then stripping off the qty_ to get the
> stocknumber you need.
> 
> jon
> ----- Original Message -----
> From: "Owens, Howard" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, December 11, 2001 8:06 PM
> Subject: FORM with changing quanties for multiple items
> 
> 
> > Either I'm having a brain fart, or I'm just clueless, but I'm having a
> hard
> > time figuring out how to do this.
> >
> > I have a form with multiple items that can be ordered.  Each item can
> have
> > additional items.
> >
> > The form items are populated from a query (what actual items are
> available
> > depend on current inventory).
> >
> > So you want up with something like this (much simplified)
> >
> > Item Name, Price, <input type=text name=quantity>
> > repeat
> > repeat
> > repeat
> >
> > What I'm trying to figure out is how to submit the form and match up the
> > potentially new quantity numbers with the items the person wants more
> of.
> >
> > In other words, when the user says he wants 3 of product A and 5 of
> Product
> > B and 0 of Product C, the response page must parse the submission so
> that
> > those numbers match.
> >
> > I thought I've done this sort of thing before, or I would know how to do
> it
> > .. but I'm just blanking out.  But then the variation on anything that
> I've
> > done before like this is building the form based on a query.
> >
> > I've tried doing this with lists -- trying to match the product ID and
> the
> > quantity in loops, but the ProductID hidden field doesn't always reach
> the
> > response page in the same order as the quantity field.
> >
> > I've also tried arrays and structures, but there's still no reliable way
> to
> > know that the form.quanity variable is coming over in the right order to
> > match the loop.
> >
> > I've tried doing naming the quantity field like this:
> > name="quanity;#productID#", but the response code doesn't like the
> > punctuation in the name. And if I just make the name the productID
> number,
> > there is a just in time compilation error on the form field.
> >
> > I've exhausted every option of variation of the above different ways of
> > doing things, but I've been at it for five hours today and am losing
> > patience.
> >
> > Suggestions, sample code on how to do this, much appreciated.
> >
> > H.
> >
> >
> >
> > Howard Owens
> > Internet Operations Coordinator
> > www.insidevc.com
> > [EMAIL PROTECTED]
> > AIM: GoCatGo1956
> >
> > 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to