I would like to add a few hidden field values to a form as it is
submited via JavaScript.
I have a static page shopping site that uses MIVA shopping cart. Some
of the pages are getting quite large and I want to start reducing the
amount of code on each page. Replacing tables with divs are helping
some but not as much as I would like.
Some pages may have up to 100 different items on it and each one has
its own form for submitting the item to MIVA (add to cart). Each form
has 4 hidden fields that are the same for every item and only one
hidden field plus the numbr of items textfield that changes.
I want to place all the hidden fields in one javascript function so I
only have to place the item number hidden field and the number of
items textfield in each product's form and the Add to Cart button
would call the javascript function. The javascript function would add
the generic hidden fields and then submit the form.
I've looked everywhere for how this can be done. Any ideas of
tutorials. Typical page in question can be seen at:
http://www.sunburstbottle.com/Merchant2/cat2.html
Thanks