Hi Acheron,
Are you open to using jQuery, it would make things a bit simpler.
I'll try to show you what VIPStephan means using a jQuery example:
Code:
<h1>Search</h1>
<div id="searchResults">
</div>
<script type="text/javascript">
$(function(){
function getSearchResults(){
$.post(
'url-to-my-search.html',
{'searchQuery':'search-string'},
function(html){
//we're now inside the callback
//perform actions with data returned from search form
$('#searchResults').html(html);
//this is where you can put your event for your button
$('#button').bind('click', function(e){
getSearchResults();
});
});
}
getSearchResults();
});
</script>
Your button will have to be on the page: "url-to-my-search.html"
I just ran into this issue myself the other day, and this is how I resolved it.