1
Answer

Switch Statement

Aaron Cronje

Aaron Cronje

12y
1.1k
1
Hi...
          I am working in ajax and face a problem in switch statement. How can we define switch statement in ajax?
switch(this.xhr.readyState) {
case 3:
var e = new AjaxEvent(this);
this.dispatchEvent('data', e);
break;
case 4:
try {
// Only continue if status OK
if (this.xhr.status == 200) {
var e = new AjaxEvent(this);
this.dispatchEvent('load', e);
}
} catch (ex) {
var e = new AjaxEvent(this);
Answers (1)
Next Recommended Forum