f1.datacontrol.disabled = disabled ;
en que fallo ?? gracias
Código PHP:
<form action="controlhist.php?pag=0&ordenar=h.codi" method="post" name="f1" onsubmit="return valida(this)" >
<!--Paranetre this, que referencia en este contexto al formulario desde el que se invoca la función.-->
<label>
<input type="radio" name="triacontrol" value="control" />
Control mensual</label>
<label>
<input type="radio" name="triacontrol" value="lactacio" onclick="anula()"; />
Lactacio </label>
{literal}
<script>
function valida(f1)
{
if (f1.triacontrol[0].checked || f1.triacontrol[1].checked){
return true;
}
else{
alert ('Formulari incomplet');
return false;
}
}
function anula()
{
alert('anula');
f1.datacontrol.disabled = disabled ;
}
</script>
{/literal}
<select name="menu1" onchange="salta();">
{section name=sect3 loop=$resultatsany step=1}
<option value={$resultatsany[sect3].any}>{$resultatsany[sect3].any}</option>
{/section}
</select>
<select name="datacontrol" >
{section name=sect2 loop=$resultatsdata step=1}
<option value={$resultatsdata[sect2].data}>{$resultatsdata[sect2].data}</option>
{/section}
</select>