D
David Goldstein
Hello, all,
I am new to this group and have a question that I am sure one of you JS
experts can quickly help me with. I have a login page that calls a php
script to verify that the user exists. If the user exists, the value
returned is "success" and the user should be directed to a member page.
Well, everything is working except for the redirect. Here is the code in
question:
--------------------------------------------------------
function updatePage() {
if (xmlHttp.readyState == 4) {
var response = xmlHttp.responseText;
if (response == "success") {
alert(response+"! member exists");
window.location.href = "../memberPage.php";
return false;
} else {
document.getElementById("testDiv").value = response;
alert(response);
}
}
}
-----------------------------------------------------------
I have tried location.href and window.location.href, however, nothing is
working. The value being returned is correct and the alert box displays
with the success message. The next line does not execute, however.
Thank you in advance,
David
I am new to this group and have a question that I am sure one of you JS
experts can quickly help me with. I have a login page that calls a php
script to verify that the user exists. If the user exists, the value
returned is "success" and the user should be directed to a member page.
Well, everything is working except for the redirect. Here is the code in
question:
--------------------------------------------------------
function updatePage() {
if (xmlHttp.readyState == 4) {
var response = xmlHttp.responseText;
if (response == "success") {
alert(response+"! member exists");
window.location.href = "../memberPage.php";
return false;
} else {
document.getElementById("testDiv").value = response;
alert(response);
}
}
}
-----------------------------------------------------------
I have tried location.href and window.location.href, however, nothing is
working. The value being returned is correct and the alert box displays
with the success message. The next line does not execute, however.
Thank you in advance,
David