0
我正在使用Jquery标签 - 它从远程JSON字符串获取关键字列表 - 这工作正常。jQuery与Mod_Rewrite从somefile.php更改请求?q = foo到/ somefile/foo?
但是什么现在我有了在这里,而不是jQuery的“向下钻取”键入其试图做
somefile.php?q中的搜索查询的情况= foo的
(富是你刚刚输入的内容,这将向下钻取的标签列表,只在其中显示那些“富”。
我使用Laravel 4,所以我需要根本上改变了ajax请求它,而不是/somefile/foo
。是否有任何w是否这样做?我一直在疯狂地寻找,但找不到解决方案。
仅供参考,这里的标签,它的代码,我目前有:
$("#tags").tagit({
autocomplete: {delay: 0, minLength: 2},
allowSpaces: true,
onlyAvailableTags : false,
tagSource: function(search, showChoices)
{
var that = this;
$.ajax({
url: "/admin/keywords/autocomplete",
data: { term:search.term },
dataType: "json",
success: function(choices)
{
showChoices(that._subtractArray(choices, that.assignedTags()));
}
});
}
});