If you can't edit the calendar code to fire off an ajax function when a new date is selected then one option could be to set up a setInterval to poll the value of the textbox, say every 2 secs, and if the value has changed then fire off an ajax request. Something like this as a starting point:
Code:
<form action="" method="post" >
<select id="sel1" name="sel1" onchange="doThis(this.value);">
<option value="">Choose a value</option>
<option value="val1">Value 1</option>
<option value="val2">Value 2</option>
<option value="val3">Value 3</option>
<option value="val4">Value 4</option>
</select>
<input type="text" id="txt1" name="txt1" />
</form>
Code JavaScript:
<script type="text/javascript">
function doThis(val){
document.getElementById('txt1').value = val;
}
function checkVal(elem){
if(elem.value != elem.prevValue){
alert('textbox value has changed');
elem.prevValue = elem.value;
}
}
window.onload=function(){
var txt1obj = document.getElementById('txt1');
txt1obj.value = '';
txt1obj.prevValue = ''
setInterval(function(){checkVal(txt1obj);},2000);
}
</script>
The <select> simulates your calendar.
Bookmarks