Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.03 KB | None | 0 0
  1.           <form method="post" action = "UserUsunKonto.php">
  2. <script src="xmlhttp.js"></script>
  3. <script language="JavaScript" type="text/javascript">
  4. var XMLHttp = getXMLHttp();
  5. function handlerFunction()
  6. {
  7.   if (XMLHttp.readyState == 4)
  8.   {
  9.       console.log(XMLHttp.responseText);
  10.       if(XMLHttp.responseText.indexOf('1')< 1)
  11.       alert('haslo jest niepoprawne!');
  12.   }
  13. }
  14.  
  15. function sprawdzHaslo(g) {
  16. XMLHttp.open("POST", "checkhaslo.php");
  17. XMLHttp.onreadystatechange = handlerFunction;
  18. XMLHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  19.  
  20. }
  21.  
  22. </script>
  23.                 <table align="center">
  24.      
  25.                     <tr><td> Podaj hasło:  </td><td><input type ="password" name="haslo" onblur="sprawdzHaslo(this.value)" required></td></tr>
  26.              
  27.                 <br/><br>            
  28.                 <tr><td>Czy jesteś pewien, że chcesz usunąć konto?</td></tr>
  29.                 <tr><td><input type="submit" value="Tak"></td></tr>
  30.             </table>          
  31.             </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement