Languages

Menu
Sites
Language
Web application - Issue loading local configuration file

 

When trying ot load a local configuration file (i.e. stored at the root of the .wgt file) via an XMLHttpRequest, I have the following error message: "Http Error #0".
I tried using following file path, but I always have the error message:
-config.xml
-/config.xml
-./config.xml
-/opt/apps/mUly20V7K5/res/wgt/config.xml
 
I also tried async and sync with no success.
 
My question is: can I access local files via XMLHttpRequest and how ?
 
Thanks
Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

2 Replies
Lakshmi Grandhi
Thanks for posting, i am looking into your post will get back you
Lakshmi Grandhi
In case of local file reading using XMLHttpRequest it wont return status as 200, even if the status is 0 , we can the file data Below is working fine var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 ) { console.log("statusText"+xmlhttp.responseXML); console.log(xmlhttp.responseXML.firstChild.tagName); } else { console.log("--------response"+ xmlhttp.readyState ); } } xmlhttp.open("GET", 'config.xml', true); xmlhttp.send(); Thanks Lakshmi