Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- // the URL for the request
- url: "findPatient.php",
- // the data to send (will be converted to a query string)
- data: {pnhsno: $('#search').val()},
- // whether this is a POST or GET request
- type: "GET",
- // the type of data we expect back
- dataType : "json",
- // code to run if the request succeeds;
- // the response is passed to the function
- success: function( json ) {
- $('#ex1').val(json[0].firstname);
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement