-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasa_script.js
28 lines (20 loc) · 982 Bytes
/
asa_script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var UNAME=document.cookie;
function submitAsa() {
var xhttp = new XMLHttpRequest();
var params ='titulo='+document.getElementById("titulo").value+'&fecha='+document.getElementById("date").value+'&descripcion='+document.getElementById("description").value+"&usuario="+UNAME+"&lugar="+document.getElementById("lugar").value+'&hora='+document.getElementById("tim").value;
xhttp.open("POST", "register_asamblea.php", true);
xhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
xhttp.send(params);
xhttp.onreadystatechange =function(){
if(this.readyState==4 && this.status==200){
if(xhttp.responseText=='Registrado Exitosamente'){
alert("Registrado Exitosamente");
}
else{
alert(xhttp.responseText);
}
return false;
}
}
return false;
}