Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Adam on Sep 09, 2009 07:44
open dhtmlx forum
LoadXML Error

Ok, in the Init function of the scheduler, I have this line of code:
scheduler.load("http://127.0.0.1/events.xml");
I'm testing on my local host and for a while it worked but all of a sudden it pops up the message box saying Error Type: LoadXML Description Incorrect XML.. So I changed it to
scheduler.load("events.xml");
which is the EXACT SAME FILE, just in a different directory on my E:\ drive.. and it works fine. Has anyone else experienced this or know how to deal with this? Thanks in advance!
Answer posted by Support on Sep 09, 2009 07:56
It is similar to cross domain issue - component can fetch xml document only from the same domain as the page in which it is placed. 
So if you have
         scheduler.load("http://127.0.0.1/events.xml");
then the page with scheduler need to be loaded as
          http://127.0.0.1/some.html
using different domain will cause the problem. 

After switching to the 
          scheduler.load("events.xml"); 
domain part is not included anymore so xml will be loaded correctly for any html page url.