Long shot here but I thought I might ask.
I have some code. 2 functions. I can not quite fiqure out what it is doing. It appears to be returning some type of array but not sure how to handle results[]
/// -----------------------------------------------
function handleHttpResponse() {
if (http.readyState == 4) {
result = http.responseText.split("||");
image_GetCode();
if (!result[0]){
alert ("Opps there was a problem");
return;
}
if (result[2]){
var visit = confirm(result[2]);
if (visit) test_LoadURL(result[1]);
return;
}
if (result[1])
alert(result[1])
else {
alert(result[0]);
document.getElementById("val_1").value = "";
document.getElementById("val_2").value = "";
document.getElementById("val_3").value = "";
}
}
}
function image_GetCode(){
var currentTime = new Date();
var newtime = currentTime.getTime();
document.getElementById("Image-CodeImg").setAttribute("src", " + newtime);
}
I have some code. 2 functions. I can not quite fiqure out what it is doing. It appears to be returning some type of array but not sure how to handle results[]
/// -----------------------------------------------
function handleHttpResponse() {
if (http.readyState == 4) {
result = http.responseText.split("||");
image_GetCode();
if (!result[0]){
alert ("Opps there was a problem");
return;
}
if (result[2]){
var visit = confirm(result[2]);
if (visit) test_LoadURL(result[1]);
return;
}
if (result[1])
alert(result[1])
else {
alert(result[0]);
document.getElementById("val_1").value = "";
document.getElementById("val_2").value = "";
document.getElementById("val_3").value = "";
}
}
}
function image_GetCode(){
var currentTime = new Date();
var newtime = currentTime.getTime();
document.getElementById("Image-CodeImg").setAttribute("src", " + newtime);
}