Tuesday, February 14, 2017

Ajax Response

function showState(){
            if(xhr.readyState==4){
                if(xhr.status==200){
                    var outMsg = xhr.responseText;
                }else{
                    var outMsg = "<p>The current state is " + xhr.readyState + " and the status is " + xhr.status + "</p>";
                }
            }
            document.getElementById("updateArea").innerHTML = outMsg;
        }

No comments:

Post a Comment