function objetoAjax(){ var xmlhttp=false; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest(); } return xmlhttp; } function ValidaFormAceptacion(formulario) { if (!formulario.acepto.checked) { alert("ERROR: Aceptación cumplimentiento de la Lley Orgánica 15/1999"); return false; } } function login(id) { var $varLogin = jQuery; if( bis === undefined || bis === null){ var nDiv = '#lt_modal'; }else{ var nDiv = '#lt_modal_bis'; } $varLogin.ajax({ url:'https://privat.eden-mar.cat/lt-login.php', data: 'js=true&id='+id, cache: false, type: 'GET', complete: function (response) { $varLogin(nDiv).html(response.responseText); } }); } function lt_modal(m,i,bis) { var $varModal = jQuery; if( bis === undefined || bis === null){ var nDiv = '#lt_modal'; }else{ var nDiv = '#lt_modal_bis'; } $varModal.ajax({ url:'https://privat.eden-mar.cat/lt-modal.php', data: 'modal='+m+'&id='+i, type: 'GET', cache: true, complete: function (response) { $varModal(nDiv).html(response.responseText); }, error: function ( jqXHR, exceptionxhr, status, error ) { //alert(error); alert(jqXHR +" " + exceptionxhr+" " + status+" " + error); } }); } function lt_select_onchange(datos,div,sel){ var id = sel.options[sel.selectedIndex].value; divResultado = document.getElementById(div); ajax=objetoAjax(); ajax.open("GET", datos +"?id="+id); ajax.onreadystatechange=function() { if (ajax.readyState==4) { divResultado.innerHTML = ajax.responseText } } ajax.send(null) }