Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function connection_ajax(){
- var hr = new XMLHttpRequest();
- var url = "../login/connection.php";
- var login = document.getElementById("login").value;
- var password = document.getElementById("password").value;
- var checkbox = 1;
- var vars = "login="+login+"&password="+password;
- hr.open("POST", url, true);
- hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- hr.onreadystatechange = function() {
- if (hr.readyState == 4 && hr.status == 200) {
- var return_data = hr.responseText;
- document.getElementById("connectionState").innerHTML = return_data;
- }
- };
- hr.send(vars);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement