Modify ↓
Ticket #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: | |
| Blocking: | Blocked by: |
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
comment:2 Changed 4 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:4 Changed 3 years ago by dmethvin
- Summary changed from Automation server can't create object in ajaxSettings.xhr to ajaxSettings.xhr Automation server can't create object
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

http://darklaunch.com/2009/10/08/automation-server-can-t-create-object-jquery