ajax
requester.onreadystatechange = managestatechange;
requester.open("GET", "../phpscript/ajax_query.php?part_no=" + part,true);
requester.send(null);
return return_value;
function managestatechange()
{
switch (requester.readyState)
{
case 2, 3:
//document.getElementById("loading_label").style.display = "block";
//document.getElementById("loading_label").innerHTML = "Loading...";
break;
case 4:
//document.getElementById("loading_label").style.display = "none";
//alert(requester.responseText);
if (requester.status == 200)
{
if (trim(requester.responseText) == "TRUE")
{
//alert("the part no " + part + "exists.Save Data!!!");
//return_value = true;
process_save(1);
}
else
{
//alert("the part no " + part + " doesn't exists.");
//return_value = false;
process_save(0);
}
}
else
{
return_value = false;
}
break;
}
}
0 Comments:
Post a Comment
<< Home