Click to See Complete Forum and Search --> : Checkboxes and function validation


rmfranks
10-26-2003, 09:16 PM
I have a shopping cart script which calls a function function called dropdownvalidator when a user clicks on the ADD TO CART button. The dropdownvalidator javascript basically makes certain that user has chosen a color and size from the drop down selections. I recently have added a checkbox to the form on the page as follows:
<input type="Checkbox" name="Addon" value="Yes">

What I want to occur is if the user clicks on this box, I want the dropdownvalidator script to perform the following instruction:

Price = Price + Custom

Price and Custom are two defined fields which are available in my ASP script for referencing the actual price of the item and the "add-on" cost. This "add on" cost field is an additional cost if a user wants an additional service performed on a selected item they are purchasing.

I cannot figure out how to update the ASP "Price" field from within the dropdownvalidator function if the checkbox is selected. Any help or guidance is sincerely appreciated.