A good day

I have some ajax code to autosuggest some titles when the user is searching on my website. Now for some reason he doesnt show the searchresults.htm when the user is typing, but he shows my whole indexpage in my indexpage. I know someone told me this could happen but i dont know how i messed it up and also, for some reason my browser (Firefox) only does the autocomplete when i open Firebug.

Any help is very appriciated

function interceptSearch(e){
console.log('aan het zoeken');
$.ajax({
type: "POST",
data: $('#search form').serialize(),
url: "index.php?page=search",
timeout: '5000',
error: function(XMLHttpRequest, textStatus, errorThrown){
alert('Error loading HTML document: ' + textStatus + ' - ' + errorThrown);},
success: function(data, textStatus){
$('#search ul').remove();
$('#search').append(data);
$('#search li').hover(changeFlashImage);}
});
}
}