Side navigation
#3623 closed bug (fixed)
Opened November 19, 2008 06:45AM UTC
Closed January 05, 2010 03:58PM UTC
ajaxSettings.xhr breaks if IE activex disabled
Reported by: | Irfan | Owned by: | flesler |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | ajax | Version: | 1.4a2 |
Keywords: | Cc: | Irfan | |
Blocked by: | Blocking: |
Description
Ajax does not work on IE7 ActiveX are disabled.
Following is the XHR instantiation code in JQuery.
var xhr = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
The check window.ActiveXObject returns non-null and non-undefined on IE7 even if activeX are disabled.
However, the instantiation (new ActiveXObject("Microsoft.XMLHTTP")) throws an error. The code does not even use IE7's native XMLHttpRequest as a fallback.
This should be changed to something like:
var xhr;
try {
xhr = new ActiveXObject("Microsoft.XMLHTTP"); IE with ActiveX enabled
} catch(ex) {
xhr = new XMLHttpRequest(); IE7+ with ActiveX disabled and Non-IE
}
Steps to reproduce:
1. Disable ActiveX on IE7
(To disable ActiveX go to Tools -> Internet Options -> Security -> Internet/Intranet -> Custom Level -> Run ActiveX controls and plugins -> Disable.)
2. Try sending an Ajax Request.
Observed: JS error
Expected: JQuery should use the native XMLHttpRequest.
Versions: 1.2 to 1.2.6
Attachments (0)
Change History (7)
Changed November 19, 2008 10:36PM UTC by comment:1
cc: | → Irfan |
---|---|
owner: | → flesler |
status: | new → assigned |
Changed June 17, 2009 04:37PM UTC by comment:2
What's happening with this?
Changed August 14, 2009 03:46PM UTC by comment:3
We experienced this today. A user had installed the latest version of IE7 (7.0.573.13) and now experienced this issue. In reviewing the security settings ActiveX was enabled. ''Internet'' zone was set to ''Medium-High''.
We assumed this was caused by some non-obvious change in the enforcement of ActiveX security.
The change suggested solved the issue and is consistent with the Ajax transport handling in the Prototype library.
Changed October 30, 2009 11:19PM UTC by comment:4
Information wether ajax is supported by the client should be avialable via jQuery.support.ajax
Changed December 10, 2009 03:51AM UTC by comment:5
summary: | Ajax does not work on IE7 if activex are disabled (jQuery does not fallback to use IE7's native XMLHttpRequest). → ajaxOptions.xhr breaks if IE activex disabled |
---|
Changed December 10, 2009 03:58AM UTC by comment:6
Changed January 05, 2010 03:58PM UTC by comment:7
milestone: | 1.3 → 1.4 |
---|---|
resolution: | → fixed |
status: | assigned → closed |
version: | 1.2.6 → 1.4a2 |
Ok, we'll look into it asap.