我正在利用“ j宝”的gin,我很赞赏一些援助形式,在案文写到投入领域时,在人口减少的菜单上显示结果。
为了获得有关数据,以便填满汽车,我从我的SQL公司利用这一PHP:
$sql = ( SELECT tag, title, author, content, id FROM labels );
$result = mysql_query( $sql );
$Response = array();
while( $row = mysql_fetch_object( $result ) ){
$Response[] = array(
"id" => $row->id,
"name" => $row->tag . ": " . $row->title . ": " . $row->content .""
);
}
When a user selects the option from the autocomplete that is best for them, I convert the "name" above into the "id" using this method: var AllTagData = ; var Tags = [];
for(var i in AllTagData){
Tags.push(AllTagData[i].name);
}
function getIdFromTag(_name){
for(var i in AllTagData){
if(_name == AllTagData[i].name){
return AllTagData[i].id;
}
}
}
迄今为止,情况良好。 最后,我使用“ j基”板块,为用户提供数据:
$(document).ready(function(){
$("#Responses").autocomplete({
source: Tags,
matchContains: true,
autoFill: true,
select: function(e, ui){
$("#hidden_tags").val( getIdFromTags($("#Responses").val()) );
}});
});
守则的最后部分是,我需要帮助实施格式。 项目、格式和格式
从上述购买力平价中,我输出了“名称”中的塔格斯、标题和内容。 我为用户准备汽车包裹的方式是
- Show Tags & Title
- Hide Content
- Search through Tags, Title, and Content for possible matches
因此,尽管我想要通过内容搜索汽车,但我不想在有人居住的汽车清单中显示内容。 我只想显示塔格斯和所有权。
I ve been having a lot of trouble with this and have searched quite extensively to find an answer and would really appreciate any help you can give on how to accomplish this. Please ask any follow up questions if you need further clarification. Thanks!