Re: Phonegap FileDownload ... passing array of filenames from xbasic to javascript
chris:
i don't have version 12 , neither know your function fetchfile2(url) from that version. so if my questions are silly, say shut up.
when i look at your post #1 you have, but, one url not an array of urls.
then when you want to send the javascript to the browser you are sending that single url to the fetchfile2() function
then when you construct the arr[] an array of objects the left side is not in double quotes,
i am used to
arr.push({ "fileName" : _list[i] });
and remember you have only one url, not an array. you cannot split it anymore or did you construct the array of urls, and not include in the post?
since arr[] is an object if you want elements then you need to get the subset like
arr[i].filename.
having rambled all of these, did you construct the url before passing to fetchfile2() function, if not that should be done for the function to fetch an array of files.
about android files/files i don't think it is your misunderstanding or fault. recently android changed their file locations. i could search and find article for that and post it back for you.
again as i said you are free to say shut up.
chris:
i don't have version 12 , neither know your function fetchfile2(url) from that version. so if my questions are silly, say shut up.
when i look at your post #1 you have, but, one url not an array of urls.
dim url as c
url = Session.FormatFileDataURL(clientSideFileName)
url = Session.FormatFileDataURL(clientSideFileName)
js = js + "fetchFile2('" + js_escape(url) + "');" // <-- I changed to fetchfile2 to trigger automatic download
var arr = [];
for(var i = 0; i < _list.length; i++) {
arr.push( {filename: _list[i]} );
for(var i = 0; i < _list.length; i++) {
arr.push( {filename: _list[i]} );
arr.push({ "fileName" : _list[i] });
and remember you have only one url, not an array. you cannot split it anymore or did you construct the array of urls, and not include in the post?
since arr[] is an object if you want elements then you need to get the subset like
arr[i].filename.
having rambled all of these, did you construct the url before passing to fetchfile2() function, if not that should be done for the function to fetch an array of files.
about android files/files i don't think it is your misunderstanding or fault. recently android changed their file locations. i could search and find article for that and post it back for you.
again as i said you are free to say shut up.
Comment