Hi all,
i was trying to create some "objects" under <cfscript> to see if cfscript supported it.. and i saw the same way than javascript doesn't work, for exemple :
function createDomNode(name,content) {
this.name = name;
this.content = content;
this.type = "";
this.parentNode = null;
this.childrenCount = 0;
this.childrenNode = StructNew();
this.attributesContent = StructNew();
this.lastchild = lastchild;
this.children = children;
this.parent = parent;
this.new_child = new_child;
this.getattr = getattr;
this.setattr = setattr;
this.attributes = attributes;
return this;
}
this kind of script doesn't work cause coldfusion does not handle "this" variable. Is there any way to make it working ?
thanks..
i was trying to create some "objects" under <cfscript> to see if cfscript supported it.. and i saw the same way than javascript doesn't work, for exemple :
function createDomNode(name,content) {
this.name = name;
this.content = content;
this.type = "";
this.parentNode = null;
this.childrenCount = 0;
this.childrenNode = StructNew();
this.attributesContent = StructNew();
this.lastchild = lastchild;
this.children = children;
this.parent = parent;
this.new_child = new_child;
this.getattr = getattr;
this.setattr = setattr;
this.attributes = attributes;
return this;
}
this kind of script doesn't work cause coldfusion does not handle "this" variable. Is there any way to make it working ?
thanks..