Author: igorz
Date: 2007-02-18 05:03:41 -0500 (Sun, 18 Feb 2007)
New Revision: 73066
Modified:
trunk/mcs/class/System.Web/resources/ChangeLog
trunk/mcs/class/System.Web/resources/WebUIValidation_2.0.js
Log:
2007-02-18 Igor Zelmanovich <[EMAIL PROTECTED]>
* WebUIValidation_2.0.js:
support client side validation for RadioButtonList
Modified: trunk/mcs/class/System.Web/resources/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/resources/ChangeLog 2007-02-18 08:50:05 UTC
(rev 73065)
+++ trunk/mcs/class/System.Web/resources/ChangeLog 2007-02-18 10:03:41 UTC
(rev 73066)
@@ -1,3 +1,8 @@
+2007-02-18 Igor Zelmanovich <[EMAIL PROTECTED]>
+
+ * WebUIValidation_2.0.js:
+ support client side validation for RadioButtonList
+
2007-02-04 Igor Zelmanovich <[EMAIL PROTECTED]>
* webform.js:
Modified: trunk/mcs/class/System.Web/resources/WebUIValidation_2.0.js
===================================================================
--- trunk/mcs/class/System.Web/resources/WebUIValidation_2.0.js 2007-02-18
08:50:05 UTC (rev 73065)
+++ trunk/mcs/class/System.Web/resources/WebUIValidation_2.0.js 2007-02-18
10:03:41 UTC (rev 73066)
@@ -171,8 +171,22 @@
if (typeof (el.selectedIndex) != 'undefined') {
return el.options[el.selectedIndex].value;
}
+
+ return ValidatorGetValueRecursive(el);
}
+function ValidatorGetValueRecursive(el)
+{
+ if (typeof(el.value) == "string") {
+ if (el.type != "radio" || el.checked == true) return el.value;
+ }
+ for (var i = 0; i<el.childNodes.length; i++) {
+ var val = ValidatorGetValueRecursive(el.childNodes[i]);
+ if (val != "") return val;
+ }
+ return "";
+}
+
function ValidatorTrim (s)
{
s = s.replace (/^\s+/g, "");
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches