projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
luci-base: xhr.js: fix timeout setting with IE 11
[project/luci.git]
/
modules
/
luci-base
/
htdocs
/
luci-static
/
resources
/
xhr.js
diff --git
a/modules/luci-base/htdocs/luci-static/resources/xhr.js
b/modules/luci-base/htdocs/luci-static/resources/xhr.js
index
91dcf3f
..
de4476c
100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/xhr.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/xhr.js
@@
-54,11
+54,11
@@
XHR = function()
else
url += '?' + code;
else
url += '?' + code;
+ xhr.open('GET', url, true);
+
if (!isNaN(timeout))
xhr.timeout = timeout;
if (!isNaN(timeout))
xhr.timeout = timeout;
- xhr.open('GET', url, true);
-
xhr.onreadystatechange = function()
{
if (xhr.readyState == 4) {
xhr.onreadystatechange = function()
{
if (xhr.readyState == 4) {
@@
-92,10
+92,11
@@
XHR = function()
callback(xhr);
}
callback(xhr);
}
+ xhr.open('POST', url, true);
+
if (!isNaN(timeout))
xhr.timeout = timeout;
if (!isNaN(timeout))
xhr.timeout = timeout;
- xhr.open('POST', url, true);
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
xhr.send(code);
}
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
xhr.send(code);
}