mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 05:48:51 +00:00
[ticket/13740] Remove ActiveXObject as it is supported by IE versions >= 8
PHPBB3-13740
This commit is contained in:
parent
aa6a1c5939
commit
5ce170dcc3
1 changed files with 3 additions and 12 deletions
|
@ -3,7 +3,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function($) { // Avoid conflicts with other libraries
|
(function($) { // Avoid conflicts with other libraries
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Installer variables
|
// Installer variables
|
||||||
|
@ -26,18 +25,11 @@
|
||||||
* as of now, jQuery does not provide access to the response until
|
* as of now, jQuery does not provide access to the response until
|
||||||
* the connection is not closed.
|
* the connection is not closed.
|
||||||
*
|
*
|
||||||
* @return XMLHttpRequest|ActiveXObject
|
* @return XMLHttpRequest
|
||||||
*/
|
*/
|
||||||
function createXhrObject() {
|
function createXhrObject() {
|
||||||
var xhReq;
|
var xhReq = new XMLHttpRequest();
|
||||||
|
xhReq.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
||||||
if (window.XMLHttpRequest) {
|
|
||||||
xhReq = new XMLHttpRequest();
|
|
||||||
}
|
|
||||||
else if (window.ActiveXObject) {
|
|
||||||
xhReq = new ActiveXObject("Msxml2.XMLHTTP");
|
|
||||||
}
|
|
||||||
|
|
||||||
return xhReq;
|
return xhReq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,7 +328,6 @@
|
||||||
|
|
||||||
var xhReq = createXhrObject();
|
var xhReq = createXhrObject();
|
||||||
xhReq.open('POST', $form.attr('action'), true);
|
xhReq.open('POST', $form.attr('action'), true);
|
||||||
xhReq.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
|
||||||
xhReq.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
xhReq.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||||
xhReq.send(getFormFields($form, $submitBtn));
|
xhReq.send(getFormFields($form, $submitBtn));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue