var requestObj = false; /* Function: displayResults Parameters: formField - the name of the form field that the AJAX should pass to the back-end Purpose: This function uses the XMLHTTPRequest interface to make the server request without refreshing the page. */ function commitRequest(formField){ requestObj = false; if (window.XMLHttpRequest) { //Is the browser non-IE requestObj = new XMLHttpRequest(); if (requestObj.overrideMimeType) {requestObj.overrideMimeType('text/xml');} } else if (window.ActiveXObject){ //IE has had 2 slightly different implementations of the XML HTTP object and that is handled here try { requestObj = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { requestObj = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!requestObj) {alert(dialectConnectionErrorMessage);return false;} urlQueryString = (document.getElementById(formField).value!="")?"selectedPOS=" + document.getElementById(formField).value:""; url="/rentacar/PointOfSaleHandler?" + urlQueryString; if (urlQueryString != ""){ requestObj.onreadystatechange = displayResults; requestObj.open('POST',url,true); requestObj.send(null); } else {alert(dialectConnectionErrorMessage);} } /* Function: displayResults Parameters: none Purpose: Displays the results of the AJAX call or an error message based on the HTTP status value returned AJAX connection */ function displayResults(){ if (requestObj.readyState == 4){ if (requestObj.status == 200){ var dialectDropdownHTML = ""; dialectDropdownHTML += "