Add files via upload

This commit is contained in:
Fernando Méndez
2021-06-01 09:52:53 +02:00
committed by GitHub
parent 7166b91e83
commit 2a5a9a9d12
4 changed files with 39 additions and 18 deletions

View File

@ -3,10 +3,11 @@
* CompluCine - FDI-cines
*/
function confirmDelete() {
function confirmDelete(e) {
if(confirm("¿Está seguro de que desea eliminar su cuenta de usuario?\nEsta acción no se puede deshacer.")){
document.formDeleteAccount.submit();
document.getElementById("formDeleteAccount1").submit();
} else {
location.href = "./";
//location.href = "./";
e.preventDefault();
}
}

View File

@ -5,17 +5,30 @@
// Método 1: recargar la página y enviar un GET.
window.onload = function(){
if(!select_cinema()) select_film();
}
function select_cinema(){
var select = document.getElementById("select_cinema");
select.onchange = function(){
location.href += "&cinema=" + $('select[id=cinemas]').val();
console.log(select);
if(select != undefined){
select.onchange = function(){
location.href += "&cinema=" + $('select[id=cinemas]').val();
}
return true;
} else {
return false;
}
}
var select_ = document.getElementById("select_film");
select_.onchange = function(){
location.href += "&film=" + $('select[id=films]').val();
function select_film(){
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(){