[KSS-checkins] r49442 - in kukit/kukit.js/trunk: doc kukit
reebalazs at codespeak.net
reebalazs at codespeak.net
Thu Dec 6 12:01:34 CET 2007
Author: reebalazs
Date: Thu Dec 6 12:01:19 2007
New Revision: 49442
Modified:
kukit/kukit.js/trunk/doc/HISTORY.txt
kukit/kukit.js/trunk/kukit/forms.js
Log:
Fix multiple selection form fields marshalling on IE
dquote> (due to a necessary workaround that was not applied everywhere)
Modified: kukit/kukit.js/trunk/doc/HISTORY.txt
==============================================================================
--- kukit/kukit.js/trunk/doc/HISTORY.txt (original)
+++ kukit/kukit.js/trunk/doc/HISTORY.txt Thu Dec 6 12:01:19 2007
@@ -9,6 +9,7 @@
- Fix multiple selection form fields
marshalling on Safari
(fixes #22 in kssproject)
+ and on IE.
[ree]
- Fix error fallback handling
Modified: kukit/kukit.js/trunk/kukit/forms.js
==============================================================================
--- kukit/kukit.js/trunk/kukit/forms.js (original)
+++ kukit/kukit.js/trunk/kukit/forms.js Thu Dec 6 12:01:19 2007
@@ -179,10 +179,9 @@
value="";
} else {
var option = element.options[element.selectedIndex];
- value = option.value;
- if (value == "") {
- value = option.text;
- }
+ // on FF and safari, option.value has the value
+ // on IE, option.text needs to be used
+ value = option.value || option.text;
}
// Now process selects with the multiple option set
} else {
@@ -190,7 +189,9 @@
for(i=0; i<element.options.length; i++) {
var option = element.options[i];
if(option.selected) {
- value.push(option.value);
+ // on FF and safari, option.value has the value
+ // on IE, option.text needs to be used
+ value.push(option.value || option.text);
}
}
}
More information about the Kukit-checkins
mailing list