function selectState(e)
{
if(e==212)
{
//document.getElementById("
document.getElementById("
document.getElementById("
//document.getElementById("
}
else
{
document.getElementById("
if(xmlHttp)
{
try {
xmlHttp.open("GET","
xmlHttp.onreadystatechange = handleServerResponse;
xmlHttp.send(null);
} catch(e) {
alert("Can't connect to server:\n" + e.toString());
}
}
}
}
/*function selectCity(e)
{
var myDivLebel = document.getElementById("
myDivLebel.innerHTML = "City : ";
if(xmlHttp)
{
try {
var country = document.getElementById("
xmlHttp.open("GET","
xmlHttp.onreadystatechange = handleServerResponseCity;
xmlHttp.send(null);
} catch(e) {
alert("Can't connect to server:\n" + e.toString());
}
}
}*/
function handleServerResponse()
{
myDiv = document.getElementById("
// display the status o the request
/* if (xmlHttp.readyState == 1)
{
myDiv.innerHTML = "Request status: 1 (loading)
";
}
else if (xmlHttp.readyState == 2)
{
myDiv.innerHTML = "Request status: 2 (loading)
";
}
else if (xmlHttp.readyState == 3)
{
myDiv.innerHTML = "Request status: 3 (loading)
";
}
else*/ if (xmlHttp.readyState == 4)
{
// continue only if HTTP status is "OK"
if (xmlHttp.status == 200)
{
try {
response = xmlHttp.responseText;
//myDiv.innerHTML += "Request status: 4 (complete). Server said:
";
myDiv.innerHTML = response;
} catch(e) {
alert("Error reading the response: " + e.toString());
}
}
}
}
function handleServerResponseCity()
{
myDiv = document.getElementById("city"
/* if (xmlHttp.readyState == 1)
{
myDiv.innerHTML = "Request status: 1 (loading)
";
}
else if (xmlHttp.readyState == 2)
{
myDiv.innerHTML = "Request status: 2 (loading)
";
}
else if (xmlHttp.readyState == 3)
{
myDiv.innerHTML = "Request status: 3 (loading)
";
}
else*/ if (xmlHttp.readyState == 4)
{
// continue only if HTTP status is "OK"
if (xmlHttp.status == 200)
{
try {
response = xmlHttp.responseText;
//myDiv.innerHTML += "Request status: 4 (complete). Server said:
";
myDiv.innerHTML = response;
} catch(e) {
alert("Error reading the response: " + e.toString());
}
}
}
}
A self-motivated, multi-domain, hardworking, responsible and solutions-orientated JAVA, J2EE, Spring 4, HTML 5, CSS 3, JavaScript, ES6, Typescript, AngularJS 1.4, jQuery 1.8, PHP 5, Shell Script, PL SQL, MySQL, Google App Engine, Google Datastore, JPA, Cucumber BDD Professional with more then 8+ Years of IT experience in a various IT stages including Design, developing, Unit testing and enhancement and 24*7 support application.
Configure HTML/JavaScript
Sunday, May 23, 2010
sending ajax request
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment