Thursday, 15 April 2010

Trying to read a local text file into an array (javascript/jquery) to be read from Androids WebView -



Trying to read a local text file into an array (javascript/jquery) to be read from Androids WebView -

i trying read local text file array using javascript or jquery. in end implemented in android application using android's webview. here have @ moment.

var cardrules = new array; $.get('userfile.txt', function(data){ cardrules = data.split('\n'); console.log(cardrules); });

however chrome flashes error:

xmlhttprequest cannot load file:///c:/users/sam/documents/ringoffire/userfile.txt. origin null not allowed access-control-allow-origin.

any help appreciated!

javascript android jquery android-webview

No comments:

Post a Comment