Ver Mensaje Individual
  #6 (permalink)  
Antiguo 04/10/2004, 16:11
Dahn
 
Fecha de Ingreso: junio-2004
Ubicación: Demasiado lejos
Mensajes: 52
Antigüedad: 20 años
Puntos: 0
Cita:
Iniciado por SiR.CARAJ0DIDA
function valida()
{
if (valor == 0)
{
alert ("Debe ingresar un Tipo de Documento")
}else{
document.form1.submit();
}
}
</script>
<form name="form1">
<input type="radio" name="docto" value="1" onclick="cambia(this)">Permiso Circulacion
<input type="radio" name="docto" value="2" onclick="cambia(this)">Revision Tecnica
</form>
<input type="button" name="busca" id="busca" value="Buscar" onclick="valida()">
Sigue sin funcionar...

Vamos a ver, este es el código que tengo ahora mismo:

Código PHP:
<? include("data.php"); ?>
<link rel="stylesheet" href="../css.css" type="text/css">
    <body bgcolor="#3E0E0E">
<script language="JavaScript">valor = 0
function cambia(ra) {valor = ra.value}
function valida() {if (valor == 0) alert ("Debe seleccionar una opción.")}</script>
<form action=encuesta1.php method=post onsubmit="return comprobar(this)">
        <span class="web3"><em><font size="2"><?= $pregunta ?></font></em></span> 
            <table width="100%"><tr><td width="92%"><br><input type=radio name=op value="a" onclick="cambia(this)">
        <span class="web3"><font size="2"><?= $o1 ?></font></span></td></tr><tr> 
            <td><input type=radio name=op value="b" onclick="cambia(this)">
        <span class="web3"><font size="2"><?= $o2 ?></font></span></td></tr><tr> 
            <td><input type=radio name=op value="c" onclick="cambia(this)">
        <span class="web3"><font size="2"><?= $o3 ?></font></span></td></tr><tr> 
            <td><input type=radio name=op value="d" onclick="cambia(this)">
        <span class="web3"><font size="2"><?= $o4 ?></font></span></td></tr>
            </table><br><input type="submit" name="Submit" value="Enviar" onclick="valida()"></form>
A ver si a partir de eso alguien sabe echarme una mano...

Gracias
__________________
I'll be here..., Why...?, I'll be 'waiting'...here..., For what?, I'll be waiting...for you...so..., If you come here..., You'll find me, I promise.