verificação radio+textarea
Olá;
abaixo meu codigo:
Este codigo tem intenção q alguem por meio dos criterio avalie estado de determinado movel!
só q nao pode haver envio do formulario nulo.... portanto;
ao opinar Insatisfaorio deve justificar OBRIGATORIAMENTE no textarea
caso Satisfatorio sem justificativa...
Lenbrando q devo checar no caso de Isatisfatorio o Textarea se nao hover justificativa alerta o usuario!
esssa e minha duvida... chegar esses campos para q passa manter um controle!!
<HTML>
<HEAD>
<TITLE>titulo</TITLE>
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon"/>
<link href="style.css" rel="stylesheet" type="text/css" />
<script language="javascript">
function abreFormulario(tr)
{ if(tr.value == "n1")
{ document.getElementById("c1").style.display = "block"; }
else if(tr.value =="n2")
{ document.getElementById("c2").style.display = "block"; }
else if(tr.value == "s1")
{ document.getElementById("c1").style.display = "none"; }
else if(tr.value =="s2")
{ document.getElementById("c2").style.display = "none"; }
}
</script>
</HEAD>
<BODY>
<table valign="top" align="center" width="750">
<tr>
<td th colspan="3" ><hr><br> <b>analize os critérios:</b> <br><br> </td>
</tr>
<tr><td width="160" class="campo1"><b>Cadeira:</b></td><td class="campo1" width="100"> <input onclick="abreFormulario(this)" type="radio" name="c1" value="s1">Satisfatório</label></td> <td class="campo1" width="450"><input type="radio" name="c1" onclick="abreFormulario(this)" value="n1">Insatisfatório</label></td></tr>
<tr id="c1" style="display:none;"><td width="160" class="campo1"><b></b></td> <td class="campo1" width="100"> </td><td class="erro1" valign="top" class="campo1">
Obs.: <TEXTAREA ROWS="1" NAME="c1" COLS="45" WRAP="Hard"></TEXTAREA></td></tr>
<tr><td width="160" class="campo1"><b>USO:</b></td><td class="campo1" width="100"> <input onclick="abreFormulario(this)" type="radio" name="c2" value="s2">Correta</label></td> <td class="campo1" width="350"><input onclick="abreFormulario(this)" type="radio" name="c2" value="n2">Incorreto</label></td></tr>
<tr id="c2" style="display:none;"><td width="160" class="campo1"><b></b></td> <td class="campo1" width="100"> </td><td class="erro1" valign="top" class="campo1">
Obs.: <TEXTAREA ROWS="1" NAME="c2" COLS="45" WRAP="Hard"></TEXTAREA></td></tr>
<tr>
<td width="750" th colspan="3" align="right"> <br><br>
<input value="Enviar" type="submit">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</BODY>
</HTML>
qquer duvida postem aki!
desde já grato
Discussão (1)
Carregando comentários...