Código PHP:
    
<script language="JavaScript">
 
var comprueba = 0;
typeof comprueba;
 
function cambio(idCapa)//Funcion que realiza opcion:ida , ida y vuelta
{
var capa = document.getElementById(idCapa);
var comprueba = 1;
typeof comprueba;
capa.style.display = (capa.style.display == "none") ? "block" : "none";
                    
}
 
function verifica () //Funcion que se ejecuta cuando se ase click en el boton enviar
{
    OrigenValor = document.getElementById('Origen').value;
    document.write(comprueba);
                        
    if(OrigenValor=='Seleccione Origen')
    {
        alert ("Seleccione Origen");
    }
   else
  {
      if(comprueba == 1)
      {
    document.getElementById('frm').action='base3.php';
    formulario = document.frm["frm"]
    formulario.submit()
       }
       if(comprueba == 0)
    {
    document.getElementById('frm').action='base2.php';
    formulario = document.frm["frm"]
    formulario.submit()
                            
    }
        
    }
}
</script>
 
<html>
 
<div id="capa1">
<p>Fecha vuelta</p>
<select name="fechav"> 
<option value="Toda Fechav">Toda Fecha</option> 
<option value="01-07-2011">01/07/2011</option> 
</div>
<a href="#" onclick="cambio('capa1')" >Solo ida </a>
 
 
<input type="submit" value="Consultar" onclick="verifica()">
 
</html> 
   Gracias por leer e intentar ayudar =)
 
 




