My Below javascript is getting resopnse from servlet, when I try to validate, it is working. It is not able to validate the if statement if (xmlhttp.responseText=="1234")
.
What may be the reason
function handleServletPost() {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
if (xmlhttp.responseText == "1234") {
alert("you are star");
} else {
alert("alert-->" + xmlhttp.responseText);
}
} else {
alert("Ajax calling error");
}
}