Guest User

Untitled

a guest
May 23rd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <form name="inputform" action="page.php" method="get" onsubmit="getform()">
  2. <input value="person" name="user">
  3. <input value="password" name="pwd">
  4. <input value="place" name="organization">
  5. <input value="key" name="requiredkey">
  6. <button type="submit">Submit</button>
  7. </form>
  8.  
  9. url = $("#form").serialize();
  10. $.ajax({
  11. type: "GET",
  12. dataType: "json",
  13. url: url,
  14. success: function (data) {
  15. //modify table
  16. }
  17. });
  18.  
  19. function getform() {
  20. var http = new XMLHttpRequest();
  21. http.open('GET', 'page.php', true);
  22. http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
  23. http.send();
  24. }
Add Comment
Please, Sign In to add comment