function createRequestObject_one() { var request_o; //declare the variable to hold the object. var browser = navigator.appName; //find the browser name if(browser == "Microsoft Internet Explorer"){ /* Create the object using MSIE's method */ request_o = new ActiveXObject("Microsoft.XMLHTTP"); }else{ /* Create the object using other browser's method */ request_o = new XMLHttpRequest(); } return request_o; //return the object } var http_one = createRequestObject_one(); /* Function called to handle the list that was returned from the internal_request.php file.. */ function handleCalender_one(){ /* Make sure that the transaction has finished. The XMLHttpRequest object has a property called readyState with several states: 0: Uninitialized 1: Loading 2: Loaded 3: Interactive 4: Finished */ try { if(http_one.readyState == 4){ //Finished loading the response /* We have got the response from the server-side script, let's see just what it was. using the responseText property of the XMLHttpRequest object. */ var response = http_one.responseText; //alert(response); //document.write(response); document.getElementById("calenderSelect_one").innerHTML = response; } } catch(Exception) { } } /* Function called to get the product categories list */ function init_one() { try { http_one.open('get', '/lib/AjaxCalendar.php?name=one'); http_one.onreadystatechange = handleCalender_one; http_one.send(null); showCalender_one(); } catch(Exception) { http_one = createRequestObject_one(); } } function getCalender_one(month,year) { try { http_one.open('get', '/lib/AjaxCalendar.php?name=one&month=' + month + '&year=' + year); http_one.onreadystatechange = handleCalender_one; http_one.send(null); } catch(Exception) { http_one = createRequestObject_one(); getCalender_one(month,year); } } function showCalender_one() { document.getElementById('calenderSelect_one').style.display = 'block'; } function hideCalender_one() { document.getElementById('calenderSelect_one').style.display = 'none'; } document.write('
'); document.write('');