3.0 beta 2

*** Urgent Help Needed *** Link to a frame from tree

Is it possible to link to a frame from a tree item? I have an urgent need to make this happen fro a very important client. If it is difficult, or takes mods to the framework, I would be more than willing to pay for contract work.

Thanks, MD
Mike at iQuest
February 13,
You can just assign into the tree item text, like this -

'<a href="http://google.com" target="iframeName">Click here</a>'

and you also have to cancel default click event, which does item selection

tree.onItemClicked = function(){
return true;
}

Sample code -

var treeText = [
    '',
    '<a href="http://google.com" target="iframeName">Click here</a>',
    'Favorites',
    'Font size',
    'Search',
    'Child1',
    'Child2'
];


var treeImage = ["", "home", "favorites", "fontsize", "search"];
var treeView = {0:[1, 2, 3, 4], 1:[5, 6], 2:[7], 3:[8], 4:[9]};

var tree = new AW.UI.Tree;
tree.setId("myTree");
tree.setItemText(treeText);
tree.setItemImage(treeImage);
tree.setViewCount(function(i){return treeView[i] ? treeView[i].length : 0});
tree.setViewIndices(function(i){return treeView[i]});

tree.onItemClicked = function(){
    return true;
}

document.write(tree);
Alex (ActiveWidgets)
February 14,
Thanks Alex. That worked. I was missing the cancel default click event.

BTW, you have a great framework here. I'll be purchasing later this afternoon.

Thanks again, MD
Mike at iQuest
February 14,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.