Hi,
My prblem is I have a node that doesnt always have something in it. It is used for url’s so i put an if statement but it still puts a message even if its blank.
here are my codes to explain better:
treeDP_xml.load("web_tree.xml");
var treeListener = new Object();
treeListener.change = function (_arg2) {
var _local1 = _arg2.target.selectedItem;
if (_local1.attributes.src != undefined) {
my_pb._visible = true;
my_pb.label = none;
my_ldr.load(_local1.attributes.src);
my_label.text = ":: " + _local1.attributes.label;
my_text.text = _local1.attributes.text;
}
if (_local1.attributes.link == undefined){
my_link.htmlText = "";
}
else {
my_link.htmlText = "<A HREF=\"" + _local1.attributes.link + "\">" + "launch site" +"</A>";
}
};
<node label="+ ExpoConstantes" text="ExpoConstantes" link="http://www.expoconstantes.com" src="photos/website19-1.jpg" >
</node>
As you can see link node has a url so “launch site” shows up and the link works fine… so far so good…
However when I leave that node blank, “launch site” still shows up.
Can anyone help cos im really stuck with this one.
thanks in advance