A couple of silly xml questions:
1. If i override XML.onData event, do I have to some how call the function?
example here a sample override
XML.prototype.onData = function (src) {
if (src == undefined) {
this.onLoad(false);
//more stuff
//more stuff
} else {
this.parseXML(src);
this.loaded = true;
this.onLoad(true);
//more stuff
}
}
do I have to later call onData like this
XML.onData(parameter);
2. If my file exists locally on my computer, can I use XML.sendAndLoad where the url is a full url to a site? or is that a security issue and I can only sendAndLoad locally on the file system? Currently I am getting an error opening a url. I have access to that url but testing locally on my pc. Do i have to be on the file system for this to work?
thanks
1. If i override XML.onData event, do I have to some how call the function?
example here a sample override
XML.prototype.onData = function (src) {
if (src == undefined) {
this.onLoad(false);
//more stuff
//more stuff
} else {
this.parseXML(src);
this.loaded = true;
this.onLoad(true);
//more stuff
}
}
do I have to later call onData like this
XML.onData(parameter);
2. If my file exists locally on my computer, can I use XML.sendAndLoad where the url is a full url to a site? or is that a security issue and I can only sendAndLoad locally on the file system? Currently I am getting an error opening a url. I have access to that url but testing locally on my pc. Do i have to be on the file system for this to work?
thanks