If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

CheckBox with Quantity *Help*

Hi there

Im actualy kind of new in this and im trying to make this chekbox with quantity so i can send it to paypall.
But with these codes its not doing it like it should.
i want my clients to check the box(es) fill in the quantity and then pay.
Çan anybody tell me what i am doing wrong? or show me a better code

So that I don't accidently submit an order with many more items than I wish to have,
can you specify what it is that is not working to your satisfaction?
Where does the error appear to be or what happens when the error occurs?
Have you evaluated the error console in FF or Chrome browsers?
Is it a display problem or a submission problem?

BTW: You should enclose your program between [ code] and [ /code] tags (without the spaces) to make it easier to
see formatting. Plus it makes it easier to copy, test/debug your code.

it is a submision problem, for example when i check "#1" (witch is the first checkbox) and set the quantity it will submit corectly,
but when i check the second one without checking the first one and fill the quantity of the seconde one it wont submit with the quantity in the chekout

I would make a suggestion that you look at your script carefully and try a different approach, sometime throwing out what you have is what it takes to make a fresh start.

Consider some of the following.

1. indentation for code readability
2. simplify the script so that your javascript cart updates a smaller number of data fields, effectively reducing the form to single fields
3. split the script you have in to smaller reusable functions

Obsevations
You have check boxes, they serve little purpose and you could do a simpler script that looks at if a quantity has been added to the quantity fields and check if they are positive values before calculation of the basket on click of the paypal button.

I have had a bit of a play with the code and only Item 1 ever shows in the paypal page

Suggest that you split the paypap form and put fields in the cart in to its own form then have a function that on submit checks the form elements, tallies up what is needed, push the data in to the paypal form and then either automatically submlit the paypal form or prompt the user to click the paypal button.