solo porque lo pediste :P
Código javascript
:
Ver originalfunction showUser(){
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null) {
alert ("Browser does not support HTTP Request");
return;
}
var url="getuser2.php"
url=url+"?q="+document.getElementById("usuario").value;
if(document.getElementById("titulo").value==""){
alert("Seleccione la acción que se realizo");
return;
}
else{
url=url+"&t="+document.getElementById("titulo").value;
}
if(document.getElementById("hora").value=="00"||document.getElementById("hora").value==""){
alert("Introduzca la hora a la que se realizo el servicio");
return;
}
horas(); //despues de realizar esta funcion lo demas no lo hace
if(opc==1){
document.getElementById("lol").style.display="";
if(document.getElementById("dato").value==""){
alert('El campo de Información extra no debe estar vacio');
return;
}
}
if(document.getElementById("dato").value!=""){
url=url+"&d="+document.getElementById("dato").value;
}
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
Código javascript
:
Ver originalfunction horas(){
if(document.getElementById("hora").value=="00"||document.getElementById("hora").value==""){
alert("Introduzca la hora a la que se realizo el servicio");
return;
}
if(document.getElementById("minuto").value==""){
document.getElementById("minuto").value=="00";
alert(document.getElementById("minuto").value);
}
if(document.getElementById("meridiano").value=="pm" && document.getElementById("hora").value <8){
y = parseInt(document.getElementById("hora").value) + 12;
document.getElementById("hora").value = y;
}
var fecha = document.getElementById("mes").value+" "+document.getElementById("dia").value+" "+document.getElementById("year").value+" "+document.getElementById("hora").value+":"+document.getElementById("minuto").value+":00";
url=url+"&f="+fecha;