Ajax and checkbox state problem
New to Ajax and PHP. Am using Ajax on a form originally written in ASP.
User selects options for sponsorships using checkboxes. Each checkbox is linked to a price structure.
If he checks the checkbox, I'm using Ajax to fill in the cost of the sponsorship in a text field next to the checkbox.
This works just fine. My problem is that if the visitor changes his mind and unchecks the checkbox, I have not found a way to dismiss the cost by refilling the text field with a null or empty string. Have tried testing the checkbox value on both server and client side, but I haven't been successful yet in dismissing the price if the box is unchecked.
Can anyone direct me on how this should be done?