// JavaScript Document //Browser Support Code function ajaxFunction(){ var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e){ try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("This function requires the use of Javascript. Please enable Javascript from the Tools menu of your web browser. We apologize for any inconvenience."); return false; } } } ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4 && ajaxRequest.status == 200){ document.getElementById('searchbox-repeat').innerHTML = ajaxRequest.responseText; } if(ajaxRequest.readyState!=4){ //document.getElementById("searchbox").innerHTML= "One moment please ..."; } } var hotelName = document.getElementById('hotelName').value var cid = document.getElementById('country').value; var region = document.getElementById('region').value; var stars = document.getElementById('stars').value; var queryString = "?cid=" + cid + "&rid=" + region + "&hotelName="+ hotelName + "&stars="+ stars + "&rannum=" + Math.random(); var host = "http://www.ucch.org/includes/searchbox-hotels-test.php"; ajaxRequest.open("GET", host + queryString, true); ajaxRequest.send(null); }// JavaScript Document