L
Leo
Hello,
Im trying to set up a XML document object within a class declaration
(mozilla only):
MyClass.prototype.loadXML = function(file)
{
this.isLoaded = false;
this.xml = document.implementation.createDocument("","",null);
this.xml.onload = this.fileLoaded;
this.xml.load(file);
}
MyClass.prototype.fileLoaded()
{
this.isLoaded = true;
}
Somehow, the isLoaded property doesnt seem to be set to true when i
create an instance of the class. I tryied passing the object instance
through an argument
...
this.xml.onload = this.fileLoaded(this)
...
MyClass.prototype.fileLoaded(obj)
{
obj.isLoaded = true;
}
but i get even weirder results. Any ideas?
Thanks,
Im trying to set up a XML document object within a class declaration
(mozilla only):
MyClass.prototype.loadXML = function(file)
{
this.isLoaded = false;
this.xml = document.implementation.createDocument("","",null);
this.xml.onload = this.fileLoaded;
this.xml.load(file);
}
MyClass.prototype.fileLoaded()
{
this.isLoaded = true;
}
Somehow, the isLoaded property doesnt seem to be set to true when i
create an instance of the class. I tryied passing the object instance
through an argument
...
this.xml.onload = this.fileLoaded(this)
...
MyClass.prototype.fileLoaded(obj)
{
obj.isLoaded = true;
}
but i get even weirder results. Any ideas?
Thanks,