【发布时间】:2011-05-02 06:18:43
【问题描述】:
我正在使用像this 这样的过滤器搜索。但是我必须从数据库中动态创建列表视图。请帮助
【问题讨论】:
-
这是在页面加载时还是通过 AJAX 获取链接?
-
页面加载后,我必须创建搜索建议框
标签: android cordova jquery-mobile
我正在使用像this 这样的过滤器搜索。但是我必须从数据库中动态创建列表视图。请帮助
【问题讨论】:
标签: android cordova jquery-mobile
伪代码:
$('#aboutPage').live('pagecreate',function(event){
alert('This page was just loaded/enhanced by jQuery Mobile!');
// do ajax call to get list
$.ajax({
url: 'yourRequestPage.php?parm='+yourSearchParm[option],
type: 'GET',
error : function (){ document.title='error'; },
success: function (data) {
$('#selectOptionTag').html(data);
// Something like this:
$("div#selectOptionTag ul").listview();
// Or this
$('ul').listview('refresh');
}
});
});
【讨论】:
pseudocode 对大多数人不起作用人;)