Help - Search - Members - Calendar
Full Version: Ajax Code Not Working On Zymic Server While It Is Running Correctly On Localhost
Zymic Webmaster Forums > Web Design & Development > Client Side Scripting > JavaScript
hsarora
I have used ajax to display suggestions, when user enters alphabets in party name field.
while this code is running correctly on localhost, it is not working on zymic free host.
Any help is appreciated in advance!
the code is as follows:
var url1="getcustomer.php?param=";
if (window.XMLHttpRequest) {

http = new XMLHttpRequest();// i guess this is not working
} else if (window.ActiveXObject) {
http = new ActiveXObject("Microsoft.XMLHTTP");
}

function getcustomer() {
var idValue = document.getElementById("c_name").value;
var myRandom = parseInt(Math.random()*99999999); // cache buster
http.open("POST", url1 + escape(idValue) + "&rand=" + myRandom, true);
http.onreadystatechange = handleHttpResponse;
http.send(null);
}

function handleHttpResponse() {
if (http.readyState == 4) {
document.getElementById("hiddenDIV1")
.style.visibility="visible";
document.getElementById("hiddenDIV1")
.innerHTML=http.responseText;
document.getElementById('c_name').attachEvent('onkeydown',askproductKeyPress);
}
}

function loadrecord(record0,record1) {
document.orderform.c_name.value = record0;
document.getElementById("hiddenDIV1")
.style.visibility="hidden";
}
SP_
Can you post a link to the script? It would give me a lot of information about what is happening.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.