So I use a piece of the availability calenders from phpjabbers.com. Here is a link to the information page:https://www.phpjabbers.com/free-availability-calendar-script/
This works perfectly but now i was wondering if it was possible to reload the calenders whitout reloading the whole page. The following code is the code I use to load the calenders when the page is refreshed or loaded for the first time.
$(document).ready(function(){
$('#basic').calendar({
adapter: 'server/adapter.php',
num_next_month: 2,
num_prev_month: 0,
day_first: 1,
onSelectDate: function(date, month, year){
if (month < 10) {
month = "0" + month;
}
if (date < 10) {
date = "0" + date;
}
var datum = [year, month, date].join("-");
//alert(datum);
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById("dagoverzicht").innerHTML = xmlhttp.responseText;
}
};
xmlhttp.open("GET","tabel.php?q="+datum,true);
xmlhttp.send();
},
});
})
Thanks in advance