How can implement synchronous Ajax call using pure Javascript?
问题 I need to implement synchronous Ajax calling mechanism. I already implement ajax calling function in my helper same as below : MH.helper = { ajax : function (option) { if(option !== undefined) { for(var opt in option) { this[opt] = option[opt]; } } if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari this.xhr=new XMLHttpRequest(); } else { // code for IE6, IE5 this.xhr=new ActiveXObject("Microsoft.XMLHTTP"); } } } I also implement Ajax prototype as same as below : MH