Ver Mensaje Individual
  #3 (permalink)  
Antiguo 06/08/2014, 12:07
Avatar de omar_gutierrez
omar_gutierrez
 
Fecha de Ingreso: febrero-2011
Mensajes: 144
Antigüedad: 13 años, 2 meses
Puntos: 2
Respuesta: Javascript y php en conjunto

resto de formulario:

Código PHP:
<script type="text/javascript">
<!--------------------------------------- ------------>
function 
dias(sel) {
if (
sel.value=="2014-08-06"){
    
           
h1 document.getElementById("idhora1");
           
h1.style.display "block";

           
h2 document.getElementById("idhora2");
           
h2.style.display "none";
           
bol1.value="";
                  
           
bol1 document.getElementById("idboletos1");
           
bol1.style.display="none";
           
bol1.value="";
          
           
bol2 document.getElementById("idboletos2");
           
bol2.style.display="none";
           
bol2.value="";
          
           
bol3 document.getElementById("idboletos3");
           
bol3.style.display="none";
           
bol3.value="";
          
           
bol4 document.getElementById("idboletos4");
           
bol4.style.display="none";
           
bol4.value="";
           
      } else if(
sel.value=="2014-08-07"){

           
h1 document.getElementById("idhora1");
           
h1.style.display="none";
           
h1.value="";
           
           
h2 document.getElementById("idhora2");
           
h2.style.display "block";
           
           
bol1 document.getElementById("idboletos1");
           
bol1.style.display="none";
           
bol1.value="";
          
           
bol2 document.getElementById("idboletos2");
           
bol2.style.display="none";
           
bol2.value="";
          
           
bol3 document.getElementById("idboletos3");
           
bol3.style.display="none";
           
bol3.value="";
        
           
bol4 document.getElementById("idboletos4");
           
bol4.style.display="none";
           
bol4.value="";
      }
}
<!--------------------------------------- ------------>
function 
horas1(xxx) {
if (
xxx.value=="4pm"){
    
          
bol1 document.getElementById("idboletos1");
          
bol1.style.display "block";
           
          
bol2 document.getElementById("idboletos2");
          
bol2.style.display "none";
          
bol2.value="";

      } else if(
xxx.value=="7pm") {

          
bol1 document.getElementById("idboletos1");
          
bol1.style.display "none";
          
bol1.value="";


          
bol2 document.getElementById("idboletos2");
          
bol2.style.display "block";
      }
}
<!--------------------------------------- ------------>
function 
horilla(zzz) {
if (
zzz.value=="4pm") {

          
bol3 document.getElementById("idboletos3");
          
bol3.style.display "block";

          
bol4 document.getElementById("idboletos4");
          
bol4.style.display "none";
          
bol4.value="";

      }else if (
zzz.value=="7pm"){

          
bol3 document.getElementById("idboletos3");
          
bol3.style.display "none";
          
bol3.value="";

          
bol4 document.getElementById("idboletos4");
          
bol4.style.display "block";

      }
}
<!--------------------------------------- ------------>
</script>


<script type="text/javascript">
$(document).ready(function() {


    $('#defaultForm').bootstrapValidator({
//        live: 'disabled',
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
            nombre: {
                validators: {
                    notEmpty: {
                        message: 'Debes teclear un nombre'
                    }
                }
            },
            telefono: {
                validators: {
                    notEmpty: {
                        message: 'Debes teclear un telefono'
                    }
                }
            },
            boletos: {
                validators: {
                    notEmpty: {
                        message: 'Debes seleccionar una opción'
                    }
                }
            },
            fecha: {
                validators: {
                    notEmpty: {
                        message: 'Debes seleccionar una opción'
                    }
                }
            },
            hora: {
                validators: {
                    notEmpty: {
                        message: 'Debes seleccionar una opción'
                    }
                }
            },
            emaili: {
                validators: {
                    email: {
                        message: 'The input is not a valid email address'
                    }
                }
            }
        }
    });
});
</script>
</html>