Using DatePicker with onClose to Submit Form Problem
I'm using the DatePicker on a simple one field form and I'm using
onClose to add code to auto submit it. This works great in all
browsers I tested but IE7 where the .submit() method fails.
Here's the JS code:
$("input[name=sd]").datepicker(
{
dateFormat: 'yy-mm-dd',
mandatory: true,
showOn: 'button',
buttonImage: '/images/calendar_icon.gif',
buttonImageOnly: true,
firstDay: 0,
onClose: function(date) {
if(date != "") {
$("#selectDay").submit();
}
}
});
And the markup:
<form action="/rdv.cfm" name="selectDay" id="selectDay" method="post">
<label>Sélectioner une autre date : <input name="sd" id="sd"
type="text" size="10" maxlength="10" /></label>
</form>
The site is still in construction but here's the URL to a temp version
of the page (it's the start of an appointments system):
http://www.toilettagelarochelle.com/rdv.cfm
Thanks in advance for any help anyone can provide!
Stéphane