I have the following code in my file to load a div with HTML from an AJAX call:
$('#searchButton').click( function() { $('#inquiry').load('/search.php?pid=' + $('#searchValue').val()); });
This works fine in Firefox and Google Chrome, but whenever I do the search in IE I get redirected back to index.php. I grabbed the URL from Firebug and pasted that into IE and no redirection happens, I just get the output that should be returned.
I also tried changing it to a $.get() request and a full $.ajax() request but still the same redirection.
More fun. I have the input text and button wrapped in this form:
and IE seems to be ignoring the return false. I tried modding the jQuery function to be like Steve’s but it was still refreshing inproperly.
I removed the form tags and that took care of it.