c_pattle Posted November 2, 2010 Share Posted November 2, 2010 I am trying to use jquery for my AJAX request but am having a bit of trouble. My AJAX works but I am not sure how to get the response from the PHP page. My PHP script echo's some text but I am not sure how to append this text. I am trying to use data but I'm not sure if that's right. My script is below. $("#search").change(function() { var searchterm = $("input#search").val(); var searchString = 'search_term='+ searchterm; $.ajax({ type: "POST", url: "update_location.php", data: searchString, success: function(data) { $('#search_bar_hints').append(data); } }); return false; }); Quote Link to comment https://forums.phpfreaks.com/topic/217599-ajaxjquery/ Share on other sites More sharing options...
pengu Posted November 2, 2010 Share Posted November 2, 2010 http://www.phpfreaks.com/forums/ajax-help/ Quote Link to comment https://forums.phpfreaks.com/topic/217599-ajaxjquery/#findComment-1129693 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.