Tenho uma tag struts 2 que monta uma combo que chama uma função javascript:
<s:radio label="" name="porte" list="#{'1':'Não','2':'Sim'}" value="1" onclick="mostrardiv(this.value)"/>
<script type="text/javascript">
function mostrardiv(porte){
for(i=0;i<document.all.porte.length;i++){
if(document.all.porte[1].checked){
document.getElementById('divArma').style.display = 'inline';
}else{
document.getElementById('divArma').style.display = 'none';
}
}
}
</script>
Funciona no chrome mas não funciona no firefox, alguém sabe dizer onde estou errando?