Bug Tracker

Opened 10 years ago

Closed 10 years ago

#5338 closed bug (fixed)

ajaxSettings.xhr Automation server can't create object

Reported by: user52 Owned by:
Priority: major Milestone: 1.4
Component: ajax Version: 1.4a2
Keywords: Automation server can't create object Cc:
Blocked by: Blocking:

Description

Screen shot of error: http://imgur.com/Iq0Wu.png

in ajax.js

xhr:function(){
	return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
},

should be something like

xhr:function(){
	if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {
		try {
			return new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(e) {
			try {
				return new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch(e) {
				return false;
			}
		}
	}
},

Change History (5)

comment:2 Changed 10 years ago by dmethvin

The IE7 native XMLHttpRequest object was broken and is being circumvented so the code can't be implemented that way. The one thing in particular I can remember is that IE7 XHR doesn't support file urls. So the test for ActiveXObject has to be done first.

It sounds like Microsoft.XMLHTTP isn't installed on some systems but Msxml2.XMLHTTP is then? What version of Windows and service pack is this?

comment:3 Changed 10 years ago by user52

Windows XP Professional Service Pack 3

comment:4 Changed 10 years ago by dmethvin

Summary: Automation server can't create object in ajaxSettings.xhrajaxSettings.xhr Automation server can't create object

See related tickets #2849, #3623, #5529, when fixing this.

comment:5 Changed 10 years ago by john

Resolution: fixed
Status: newclosed
Version: 1.3.21.4a2
Note: See TracTickets for help on using tickets.