Hey all, using a simple form to return a page of results like site.com/portfolio/search/aonfr89nnasm
{exp:search:simple_form channel="portfolio" result_page="portfolio/search" form_id="search_form"}
<input type="submit" value="" class="submit" />
<input type="text" name="keywords" id="keywords" value="" size="18" maxlength="30" />
{/exp:search:simple_form}Easy peasy… however, what I want to do is be able to call a javascript function to load those results into the current page instead of loading a new page.
I have this JS function set up:
$('#search_form').submit(function() {
console.log〈"submit"〉;
return false;
});So my question is, how do I get that random search string from the form and use it to load results within JS? any ideas?