In my application one select menu and list menu are there, I want to fill the values dynamically from DB. I am able to fill values in to select menu dynamically, but How can I fill it in list view, Can Any one tell me how to fill the values dynamically in list view, My is as follows,
for (var i = 0; i < res.rows.length; i++) {
var opt = '<option value="';
opt += res.rows.item(i).Location;
opt += '">';
opt += res.rows.item(i).Location;
opt += '</option>';
$("#select-choice-location").append(opt);
}
HTML:
<select name="select-choice-location" id="select-choice-location">
<option value="Select Location">Select Location</option>
</select>
<ul data-role="listview" id="locationList" name="locationList" data-inset="true">
<li><a href="#">Select Location</a></li>
</ul>
Select menu is working fine how to write same syntax for list view to get dynamic values.