Q:

Safari/Chrome Not Posting Values When Changed Via Javascript

I have a few hidden form elements like so:
<input type="hidden" name="numberOfAdults" />

I then have an onsubmit function that does some addition and puts the sum into the hidden fields:
form.numberOfAdults.value = numAdults;

The form is submitted depending on if this function returns true or false. When the form is submitted, IE7+ and Firefox show the changed value from the onsubmit function. Safari and Chrome do not. However, if I give the hidden inputs default values:
    <input type="hidden" name="numberOfAdults" value="2" />

Then the value gets passed. Why are Safari and Chrome ignoring these changed values?
EDIT: Here is the complete code: http://jsfiddle.net/2q8SX/

A:

just a wild guess:
give your submit button:
onclick="yourFunction(); return false;"

and add to your function() as it's last command:
document.getElementByTagName('form').submit();

