I have a search form:
<form id="global_search">
<input id="global_search_input" name="search_query" placeholder="Enter search text">
<input id="global_search_button" type="submit" value="" onclick="slide_box_search(search_query); return false;" class="listings_box">
</form>
and I want to display the results in a slide down div, pulling the results in via AJAX. I'm using codeigniter, so I want to pass the search query to the controller (as a url segment). The ajax and controller bit all works fine using Jquery and the load function, however I don't know how to get the search query from the input box to the function in the submit onclick = slide_box_search(search_query)?
I'm thinking it's probably something like $(this).val() but can't quite figure it out.
Thanks in advance!