I have been pulling my hair out trying to get this to work in WordPress. I am using the Atahualpa theme.
My form takes reservation information from the user via a form and passes it to another page, which is a booking engine site.
I use onSubmit="combDep(), combRet()" to call the JS functions in the form tag. They are departure and return dates. My JS looks like this:
var dyear = document.forms.d_y.value;
var dmonth = document.forms.d_m.value;
var dday = document.forms.d_d.value;
document.forms.DepartDate.value = dyear + dmonth + dday;
var ryear = document.forms.d_y2.value;
var rmonth = document.forms.d_m2.value;
var rday = document.forms.d_d2.value;
document.forms.ReturnDate.value = ryear + rmonth + rday;
The site is: http://islandair.server304.com/hawaii/