//this code from http://developer.mozilla.org/en/docs/AJAX:Getting_Started //modified for use by Anomalous Web Development under Creative Commons License function makeRequest(value,url,dest,openMenu) { if(openMenu == null) openMenu = true; var httpRequest; if (window.XMLHttpRequest) // Mozilla, Safari, etc { httpRequest = new XMLHttpRequest(); if (httpRequest.overrideMimeType) httpRequest.overrideMimeType('text/xml'); } else if (window.ActiveXObject) // IE { try { httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!httpRequest) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } httpRequest.onreadystatechange = function() { alertContents(httpRequest,dest,openMenu); }; var aString = url+"?search="+value+"&locationID=21"; httpRequest.open('GET', aString, true); httpRequest.send(''); } function compareDatesAjax() { var httpRequest; if (window.XMLHttpRequest) // Mozilla, Safari, etc { httpRequest = new XMLHttpRequest(); if (httpRequest.overrideMimeType) httpRequest.overrideMimeType('text/xml'); } else if (window.ActiveXObject) // IE { try { httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!httpRequest) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } httpRequest.onreadystatechange = function() { compareDates(httpRequest); }; var pickupHour = document.getElementById("PickupHour")[document.getElementById("PickupHour").selectedIndex].text; var pickupMinute = document.getElementById("PickupMinute")[document.getElementById("PickupMinute").selectedIndex].text; var pickupDay = document.getElementById("PickupDay")[document.getElementById("PickupDay").selectedIndex].text; var pickupMonth = document.getElementById("PickupMonth")[document.getElementById("PickupMonth").selectedIndex].text; var pickupYear = document.getElementById("PickupYear")[document.getElementById("PickupYear").selectedIndex].text; var dropoffHour = document.getElementById("DropoffHour")[document.getElementById("DropoffHour").selectedIndex].text; var dropoffMinute = document.getElementById("DropoffMinute")[document.getElementById("DropoffMinute").selectedIndex].text; var dropoffDay = document.getElementById("DropoffDay")[document.getElementById("DropoffDay").selectedIndex].text; var dropoffMonth = document.getElementById("DropoffMonth")[document.getElementById("DropoffMonth").selectedIndex].text; var dropoffYear = document.getElementById("DropoffYear")[document.getElementById("DropoffYear").selectedIndex].text; var aString = "anomalousdev/timeCheck.php?"+"hours1="+pickupHour+"&minutes1="+pickupMinute+"&day1="+pickupDay+"&month1="+pickupMonth+"&year1="+pickupYear+"&hours2="+dropoffHour+"&minutes2="+dropoffMinute+"&day2="+dropoffDay+"&month2="+dropoffMonth+"&year2="+dropoffYear; httpRequest.open('GET', aString, true); httpRequest.send(''); } function alertContents(httpRequest,dest,openMenus) { if (httpRequest.readyState == 4) { if (httpRequest.status == 200) { var theRequests = httpRequest.responseText.split("\n"); for(var i=0; i= pickYearVal) { if(dropMonthVal >= pickMonthVal) { if(dropDayVal >= pickDayVal) { if(dropHourVal >= pickHourVal) { if(dropMinuteVal < pickMinuteVal) { dropoffMinute.selectedIndex = pickupMinute.selectedIndex; } } else if(dropHourVal < pickHourVal) { dropoffHour.selectedIndex = pickupHour.selectedIndex; } } else if(dropDayVal < pickDayVal) { dropoffDay.selectedIndex = pickupDay.selectedIndex; } } else if(dropMonthVal < pickMonthVal) { dropoffMonth.selectedIndex = pickupMonth.selectedIndex; } } else if(dropYearVal < pickYearVal) { dropoffYear.selectedIndex = pickupYear.selectedIndex; }*/ }