struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mitch Claborn" <>
Subject RE: Client side validation for radio button
Date Fri, 12 Oct 2007 12:23:08 GMT
In this case it is the xhtml theme.  (Isn't specified in the <s:head tag but
using the default specified in


Mitch Claborn

-----Original Message-----
From: Martin Gainty [] 
Sent: Wednesday, October 11, 2000 5:52 PM
To: Struts Users Mailing List
Subject: Re: Client side validation for radio button

in your jsp head tag..
    <s:head theme="?"/>
what value have you assigned to theme?

----- Original Message -----
From: "Mitch Claborn" <>
To: "'Struts Users Mailing List'" <>
Sent: Thursday, October 11, 2007 5:38 PM
Subject: Client side validation for radio button

Using the xhtml theme, client-side validation for radio button is not
working.  I've tried both "required" and "requiredstring" but I suspect that
none will work.  The javascript code (from form-close-validation.ftl) does

    function validateForm_Question() {
        form = document.getElementById("Question");

        if (form.elements['q1']) {
            field = form.elements['q1'];
            var error = "Please answer q1";
            if (field.value == "") {
                addError(field, error);
                errors = true;

Which doesn't get the actual value of the selected radio.  I can code a
workaround in form-close-validation.ftl but it seems like this would have
been solved already?

Mitch Claborn

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message