I have really big problem with calling JSON with jQueryUI autocomplete. I have this fairly simple JS:
$(document).ready(function() {
$('#Editor_Tags').autocomplete({
source: "/Forums/Ajax/GetTags",
focus: function () {
// prevent value inserted on focus
return false;
},
select: function (event, ui) {
var terms = split(this.value);
// remove the current input
terms.pop();
// add the selected item
terms.push(ui.TagName);
// add placeholder to get the comma-and-space at the end
terms.push("");
this.value = terms.join(", ");
return false;
}
});
});
And this is model I'm trying to return:
public class TagView
{
public int TagId { get; set; }
public string TagName { get; set; }
public int Weight { get; set; }
}
But that's not the main issue. Main issue is, When I start typing, jQuery do not make request to controller. I'm 100% sure, that the Url speciefied is good. Because I can manually access to controller by typing /Forums/Ajax/GetTags?term=text And I get results for it. I'm using newset version of jQuery and jQUI directly rom google CDN.
consoletab in Firebug? Is any request being sent at all?