android - javascript:how to populate the listview from the database using javascript? -
how should code listview data extracted database?
it this..
script
function querysuccess(tx, results) { var len = results.rows.length; console.log("demo table: " + len + " rows found."); (var i=0; i<len; i++) { console.log("row = " + + " name= " + results.rows.item(i).name+ " address= " + results.rows.item(i).address+ " roll_no= " + results.rows.item(i).roll_no); document.getelementbyid("list_view").innerhtml = results.rows.item(i).name; } }
html
<divid="list_view" style="float:left; width:100%; padding:0px; margin:0px;"> <ul style="float:left; width:100%; list-style:none; padding:0px; margin:0px;"> <div style=" border-bottom-color:#cccccc; border-bottom:ridge; "> <li style="font-size:18px"></li></div> </ul> </div> </body> </html>
am correct?? *how set data retrieved database div content?* somewhere wrong,because in output don't anything.except header.
Comments
Post a Comment