Reputation: 11
I've been trying to figure out what is wrong with this for the last 2 days. I have a drop down that uses autocomplete for Ids. That works fine. When an Id is selected, I'm trying to get it to load a small table that is displayed with the Id information (the onSelect
portion below).
However when the Id is selected, the page is refreshed, as if I clicked on a link. I realize this is probably something small, I just can't seem to figure it out.
var options, a;
$(document).ready(function(){
options = {
serviceUrl:'jsonExceptionRequest.cfm',
onSelect: function(value, data){
$("#claimData").load('ajaxExceptionRequest.cfm?Id=' + value);
}
};
a = $('#query').autocomplete(options);
return false;
});
<span id="claimData"></span>
Upvotes: 1
Views: 451