I have been working on loading data from the browser using a URL and currently utilizing JavaScript to achieve this.
window.onload = function()
{
// This is the specific URL I am attempting to load data from.
// The XML file with myURL is located on localhost.
var url = "myURL&callback=processDATA";
loadDATA(url);
}
function loadDATA(url)
{
var headId = document.getElementsByTagName('head')[0];
var newScript = document.createElement('script');
newScript.type = 'text/javascript';
newScript.src = url;
headId.appendChild(newScript);
}
function processDATA(feed) // This function should be called after loadDATA(url).
{
// My goal is to have my XML file stored in the feed variable.
// However, for some reason, this function is not being executed following loadDATA.
}
I am at a loss and unsure of how to proceed. Any assistance would be greatly appreciated.