projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a5cb3b0
)
Fix a nasty Internet Suxplorer bug which prevented XHR forms from being correctly...
author
Steven Barth
<steven@midlink.org>
Sat, 8 Nov 2008 15:27:31 +0000
(15:27 +0000)
committer
Steven Barth
<steven@midlink.org>
Sat, 8 Nov 2008 15:27:31 +0000
(15:27 +0000)
libs/cbi/htdocs/luci-static/resources/cbi.js
patch
|
blob
|
history
diff --git
a/libs/cbi/htdocs/luci-static/resources/cbi.js
b/libs/cbi/htdocs/luci-static/resources/cbi.js
index e9a801154840a9c8aa02e3768e6a6c63e0181cc9..abeba345bdee8379ca857943ae0136e28f77b2c2 100644
(file)
--- a/
libs/cbi/htdocs/luci-static/resources/cbi.js
+++ b/
libs/cbi/htdocs/luci-static/resources/cbi.js
@@
-195,22
+195,21
@@
function cbi_filebrowser(id, url, defpath) {
//Hijacks the CBI form to send via XHR (requires Prototype)
function cbi_hijack_forms(layer, win, fail, load) {
//Hijacks the CBI form to send via XHR (requires Prototype)
function cbi_hijack_forms(layer, win, fail, load) {
- layer.select('form').each(function(form) {
- form.observe('submit', function(event) {
+ var forms = layer.getElementsByTagName('form');
+ for (var i=0; i<forms.length; i++) {
+ $(forms[i]).observe('submit', function(event) {
// Prevent the form from also submitting the regular way
event.stop();
// Prevent the form from also submitting the regular way
event.stop();
- var form = event.element();
-
- if (load) {
- load();
- }
-
// Submit via XHR
// Submit via XHR
-
form
.request({
+
event.element()
.request({
onSuccess: win,
onFailure: fail
});
onSuccess: win,
onFailure: fail
});
+
+ if (load) {
+ load();
+ }
});
});
- }
);
+ }
}
}