Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. $.ajax({
  2. // the URL for the request
  3. url: "findPatient.php",
  4. // the data to send (will be converted to a query string)
  5. data: {pnhsno: $('#search').val()},
  6. // whether this is a POST or GET request
  7. type: "GET",
  8. // the type of data we expect back
  9. dataType : "json",
  10. // code to run if the request succeeds;
  11. // the response is passed to the function
  12. success: function( json ) {
  13.  
  14. $('#ex1').val(json[0].firstname);
  15. }
  16.  
  17.  
  18. });
  19.  
  20.  
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement