2.20. Back to getCustomerInfo()With the request object taken care of, let's get back to coding getCustomerInfo(). Remember where we left this function? function getCustomerInfo() { var phone = document.getElementById("phone").value;This is the code you wrote back in Step 1. createRequest();Get rid of this line... now our request object is created in static JavaScript. var url = "lookupCustomer.php?phone=" + escape(phone);Next up is getting the PHP script working on the Break Neck server. request.open("GET", url, true); request.onreadystatechange = updatePage; request.send(null); } |