Hello,
I need your help!
How do I include code in html and js ChronoForms?
Thanks!
I need your help!
How do I include code in html and js ChronoForms?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function alerta()
{
if (document.form1.grupo1[2].checked == true)
{
alert('Especifique o campo "Outros"!');
return false;
}
return true;
}
</script>
<script type="text/javascript">
function limpar(target){
target.value= "";
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p>
<label>
<input name="grupo1" type="radio" id="001" checked="checked" onclick="limpar(this.form.elements['resultado']);this.form.resultado.disabled = this.checked;" />
opção1</label>
<br />
<label>
<input type="radio" name="grupo1" value="valor2" id="002" onclick="limpar(this.form.elements['resultado']);this.form.resultado.disabled = this.checked;" />
opção2</label>
<br />
<label>
<input type="radio" name="grupo1" value="valor3" id="003" onclick="alerta(); limpar(this.form.elements['resultado']) ;this.form.resultado.disabled = !this.checked;" />
opção3</label>
</p>
<p>
<label>
Teste outra
<input type="text" name="resultado" disabled="disabled" id="resultado" onclick="limpar(this)"; />
</label>
<br />
</p>
</form>
</body>
</html>
Thanks!
This topic is locked and no more replies can be posted.
