Add files via upload

This commit is contained in:
Fernando Méndez
2021-05-31 12:05:22 +02:00
committed by GitHub
parent af0d9ccd25
commit 425af67eb5
4 changed files with 109 additions and 22 deletions

View File

@ -157,7 +157,7 @@ $(document).ready(function() {
$("#codeValid").show();
$("#codeInvalid").hide();
code[0].setCustomValidity("");
} else if(code.val().length > 0 ){
} else if(code.val().length > 0 && data === "!avaliable" ){
$("#codeValid").hide();
$("#codeInvalid").show();
code[0].setCustomValidity("El código promocional no es válido.");

View File

@ -11,24 +11,28 @@ window.onload = function(){
}
}
var select_ = document.getElementById("select_film");
select_.onchange = function(){
location.href += "&film=" + $('select[id=films]').val();
}
// Método 2: enviar una petición AJAX con POST. ==> (NO FUNCIONA, PERO LA IDEA ERA HACERLO ASÍ PARA EVITAR REFRESCAR LA PÁGINA Y LLENAR LA URL)
/*
$(document).ready(function(){
$("#select_cinema_session").change(function(){
$("#select_cinema").change(function(){
var cinema = $('select[id=cinemas]').val();
//console.log($('select[id=cinemas]').val());
$.ajax({
url : 'index.php',
type : 'POST',
dataType : 'text',
data : 'cinema='+cinema,
cache : false,
async : false,
success: function(data){
url : "index.php",
type : "post",
dataType : "html",
data : "",
success: function(response){
$("#cinemas > option[value="+ cinema +"]").attr("selected", true);
console.log(cinema);
},
error: function(response)
{
error: function(response){
console.log(response + ' ==> Error al seleccionar el cine')
}
});