I am actually trying to retrieve something for a sqlite database and store the results in an array. So I create an array and pass it as an argument to the function. Then after the function returns, the array remains undefined. What is the problem with that?
function initGraphView()
{
var resultsArray=new Array(12);
getGraphData(defaultQueryString,resultsArray);
alert(resultsArray[0]); //undefined
}
getGraphData=function(queryString,resultsArray)
{
dbConnection.transaction(function(tx){
tx.executeSql(queryString, [],
function(SQLTransaction, data)
{
for(var i=0;i
var resultsArray = [];