DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11520>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11520 [validator-rules.xml] javascript validateRequired() function does not work with radio objects [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|LATER | ------- Additional Comments From [EMAIL PROTECTED] 2003-06-18 17:50 ------- Attachment 6876 contains a modified validateRequired function that works for banks of radio buttons (confirmed to work in Netscape 4.7 and IE 5.5 thus far). Lines 40-52 do the following: - check to see if the field is an array by testing its length (Non-arrays return undefined, but I am still testing a greater than zero condition in case there is some browser out there that returns 0 instead of undefined, for example) - set a flag of -1, indicating nothing selected - iterate through the array, setting the flag equal to the loop value if that iteration's checked value is true - at the end of the iteration, if the flag is still < 0, set bValid to false, and add the radio button's error message to the fields array --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]