Guest User

Untitled

a guest
May 17th, 2018
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. function checkLogin()
  2. {
  3. // navigator.notification.alert("hiii");
  4.  
  5. var username;
  6. var password;
  7.  
  8. var x=new XMLHttpRequest();
  9. x.onreadystatechange=function()
  10. {
  11.  
  12. // alert("....."+x.responseText);
  13. if (x.readyState == 4 && x.status == 200)
  14. {
  15. // alert(x.readyState+" --- "+x.status);
  16. alert("hai checkLogin");
  17. var item=x.responseText.trim();
  18. alert("Message :"+item);
  19.  
  20. if(item=="1")
  21. {
  22. window.location="home.html";
  23. }
  24. }
  25. }
  26.  
  27. //alert("open");
  28. x.open("POST", "http://localhost:8087/CarRental/com/selcar/getLogin.jsp?username="+document.getElementById('username').value+"&password="+document.getElementById('loginpaswrd').value, true);
  29. x.send();
Add Comment
Please, Sign In to add comment