how should we get the value from the sqlite using java script as we give in android.
instance name = db.arraylistname(id);
column name = instance name.get(0).get("column name");
how should we give it in java script?
how can we set text as we do in android such as,
text_view.setText(column name);
how should we give it in java script?whereas i have given the text as a listview's data.
Rather,all the data in the "column name" should be viewed as a list view.
and normally,how should we settext for a tag as we do it for a text view in android.
i mean i would like to get a value from the database and place it in the content of the para tag <p>....</p>
please..help..i have no clue of it.
when i use the following coding to retrieve the data
var len = results.rows.length;
for (var i = 0; i < len; ++i)
{
var obj = results.rows.item(i);
console.log(+obj);
}
i get the following in the log
04-17 11:54:59.416: D/CordovaLog(23307): Returned rows = 2
04-17 11:54:59.416: I/Web Console(23307): Returned rows = 2 at file:///android_asset/www/index.html:33
04-17 11:54:59.416: D/CordovaLog(23307): NaN
04-17 11:54:59.416: I/Web Console(23307): NaN at file:///android_asset/www/index.html:38
04-17 11:54:59.427: D/CordovaLog(23307): NaN
04-17 11:54:59.427: I/Web Console(23307): NaN at file:///android_asset/www/index.html:38
04-17 11:54:59.427: D/CordovaLog(23307): No rows affected!
04-17 11:54:59.427: I/Web Console(23307): No rows affected! at file:///android_asset/www/index.html:44
i get NaN iwhereas i should get the data entered into the table.