I need to change on the fly the class of an HTML element depending on the choice made by an user with a radio button but the problem is that I get the message
"Erreur : missing ) after argument list Fichier Source : website Ligne : 1, Colonne : 71 Code Source : document.getElementById('jj_conjoint').setAttribute('class','validate['required']');".
my code :
<label>Husband/Wife :</label>
<input type="radio" name="not_single" value="yes" onclick="document.getElementById('birthdate_partner').setAttribute('class','validate['required']');">yes
<input type="radio" name="not_single" value="no" checked="checked">no
<select name="birthdate_partner" id="birthdate_partner">
<option value="" selected="selected">-</option>
<option value="1987" >1987</option>
<option value="1986" >1986</option>
<option value="1985" >1985</option>
<option value="1984" >1984</option>
</select>
'validate['), followed by a variable (required), followed by another string (']'). Can we see the entire code somewhere? I think it could help understand the problem.