I have some hidden form elements:
<input type="hidden" name="numberOfAdults" />
Then I have an onsubmit function that does some addition and puts the amount in hidden fields:
form.numberOfAdults.value = numAdults;
The form is submitted depending on whether this function returns true or false. When the form is submitted, IE7 + and Firefox display the changed value from the onsubmit function. Safari and Chrome not. However, if I give hidden default input values:
<input type="hidden" name="numberOfAdults" value="2" />
Then the value is transmitted. Why are Safari and Chrome ignoring these changed values?
EDIT: Here is the full code: http://jsfiddle.net/2q8SX/
source
share