I posted this in the Manning forums where I didn't get a response. Since I know one of the authors will read this, I'm posting it here too.
The
original question.
In listing 1.1, what should the second "else if" be?
It says:
if ( document.XMLHttpRequest) {
xhr = new XmlHttpRequest();
} else { // I assume this should be else if, but what is the if condition <---------------
xhr = new ActiveXObject ("Microsoft.XMLHTTP");
} else {
alert("cannot use Ajax");
}