geotso
Junior Member
Posts: 2
Registered: 7/30/2003
Member Is Offline
|
| posted on 7/30/2003 at 06:39 PM |
|
|
call a function from a node
I've tried to substitute a link with a function but to no avail. Can Tree Menu do this, or something is wrong in my script ?
The script is:
var conf= "A warning that the page will open in a new window"
function openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
function confirmBox() {
if (confirm(conf)) {
openBrWindow('URLoftheFile','ThePage','TheFeatures');
}
}
and the TREE ITEM is:
['External Page', "javascript:confirmBox();"]
Well, can someone tell me what is wrong with this, please? Thanks...
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 7/31/2003 at 06:56 AM |
|
|
You should define target frame properly in your tpl.js file:
'target' : '_self'
|
|
|
geotso
Junior Member
Posts: 2
Registered: 7/30/2003
Member Is Offline
|
| posted on 7/31/2003 at 03:22 PM |
|
|
rock,
thanks for your answer, but...
I think I wasn't clear enough in my post:
I want all nodes to 'target':'mainFrame', and ONLY the one with the function in its own window.
The change in the tpl.js will affect all the nodes. No?
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 7/31/2003 at 06:09 PM |
|
|
Yes, target parameter in the tpl.js affects all item target field. Standart version of the Tigra Tree does not support independent link targeting for
separate item.
But PRO version supports such feature.
|
|
|