然而,我已经看到了与这一问题有关的所有问题,但无法找到解决办法。 我正在与支离破碎的汽车公司合作。 我的设想是,
I have a check box. When It is checked, an ajax request is sent to server which fetch some information from database and returned the json encode data. On success function I call the jquery autocomplete and in source I provide the data returned by my ajax request. When I start writing some thing in my text box, (I can see in firebug console tab) a get
request is sent having all my option which are returned from ajax request like this
http://localhost/project/module/controller/index/%5B%22Mobile%22,%22Watch%22,%22Lamps%22,%22Harry%20Potter%22,%22Suitcase%22,%22Halloween%22,%22Xmas%22,%22Multiple%22,%22oil%22,%22Empty%20Keywords%22,%22iphone%20theme%22,%22Edit%20theme%22,%22Final%20Theme%22%5D?term=mo
并且没有发生。 没有任何选择可证明汽车完整。 我的法典如下:
<input type="checkbox" name="prebuilt-Themes" id="prebuilt-Themes" onclick="get_all_themes();">
文本框
<input type="text" id="themes" style="display: none;" class="ui-autocomplete-input">
以及处理麻风病要求的职能
function get_all_themes()
{
if($("#prebuilt-Themes").is( :checked ))
{
$( #themes ).show();
$.ajax({
type: POST ,
//data:({string: abc }),
url: "<?= $this->baseUrl(); ?>/module/controller/getallthemes",
success:function(data)
{
$(function() {
$( "#themes" ).autocomplete({
source: data
});
});
}
});
}
}
我从我的阿贾克斯请求获得的数据就是如此。
["Mobile","Watch","Lamps","Harry Potter","Suitcase","Halloween","Xmas","Multiple","oil","Empty Keywords","iphone theme","Edit theme","Final Theme"]
谁能指导我那天我做错事?