Twango Posted December 6, 2010 Share Posted December 6, 2010 Hi, I'm using weebly, i embed the code in a code-box, for some reason it only works IN weebly.comWhen i publish my site it wont work!here's my code:<div style="background-color:green;text-color:red;border:2px solid red" ><font color="white" size="20px">Santa is in <p style="color:white;font-size:20px" id="ms">Loading...</p></font></div><script type="text/javascript" src="http://w3host.weebly.com/uploads/2/8/9/6/2896432/load.js"></script><script type="text/javascript">xmlDoc=loadXMLDoc("http://www.weebly.com/uploads/2/8/9/6/2896432/santatracker.xml");function doIt(){x=xmlDoc.getElementsByTagName("loc")[0]y=x.childNodes[0];m=y.nodeValue;document.getElementById("ms").innerHTML = m;}onload(doIt());</script>i have the XML and .js uploaded to a different server, in the site designer it works. But not once published. Can you help? Link to comment Share on other sites More sharing options...
boen_robot Posted December 6, 2010 Share Posted December 6, 2010 XMLHttpRequest, any function that calls it, and JavaScript in general, can only operate on the same domain the JavaScript/(X)HTML file was loaded from.If you make the paths relative, and then copy ALL files on the new domain, it will work. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.