Languages

Menu
Sites
Language
Cannot access to XML file with javascript

Hello,

I am developing a HTML5 based app for Tizen, using their tizen-privilege API.

This app needs to get the content of a XML file hosted on a remote server using HTTP protocol. So i used a XMLHttpRequest object to deal with that :

xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET","http://.../auto.xml",false);
xmlhttp.send(null);
xmlDoc=xmlhttp.responseXML;

And i got this error :

ABORT_ERR: XMLHttpRequest Exception 102: The user aborted a request in synchronous requests.

Could somebody tell me what does that mean ?

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

2 Replies
Raghavendra Reddy Shiva
Did you add network access privilege in config file ? If not, you need to provide the permissions to access the network resources in the "Config file" under "Access" tab. Open the config file and add the URL you need to access under the "Network URL", and make sure you mark the allow sub domains as "TRUE". OR just add the below code to config file source,
Lakshmi Prathyusha
Hi Webwag, use this one: var xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", xmlfile, false); xmlhttp.setRequestHeader('Content-Type', 'text/xml'); xmlhttp.send(""); xmlDoc = xmlhttp.responseXML; readXML();