bird
Junior Member
Posts: 7
Registered: 2/14/2006
Member Is Offline
|
| posted on 2/15/2006 at 09:10 AM |
|
|
very urgent - click
very urgent - click
hi.
thanks for reply, i will ask my question again maybe you could help me.
first: i am using the free version using this files:
tree.js , tree_items.js and tree_tpl.js.
i want to change the event click in the tree with the dblclick event so the event click will not work and the dblclick send me to the target (another
page)? where should i change?
i know javascript but i search on the tree.js and tryed to change on the code but i could only make changes to the folder (node) and not to the files,
so please help.
i will post the code where i tried to change but it didn't work to me:
function item_init () {
var a_offset = [],
o_current_item = this.o_parent;
for (var i = this.n_depth; i > 1; i--) {
a_offset = '<img src="' + this.o_root.a_tpl[o_current_item.is_last() ? 'icon_e' : 'icon_l'] + '" border="0"
align="absbottom">';
o_current_item = o_current_item.o_parent;
}
return '<table cellpadding="0" cellspacing="0" border="0"><tr><td nowrap>' + (this.n_depth ? a_offset.join('') +
(this.a_children.length
? '<a href="javascript: trees[' + this.o_root.n_id + '].toggle(' + this.n_id + ')" onmouseover="trees[' + this.o_root.n_id +'].mover(' +this.n_id + ')" onmouseout="trees[' + this.o_root.n_id + '].mout(' + this.n_id + ')"><img src="' + this.get_icon(true) + '"
border="0" align="absbottom" name="j_img' + this.o_root.n_id + '_' + this.n_id + '"></a>'
: '<img src="' + this.get_icon(true) + '" border="0" align="absbottom">') : '')
+ '<a href="' + this.a_config[1] + '" target="' + this.o_root.a_tpl['target'] + '" onclick="" ondblclick="trees[' +this.o_root.n_id+ '].toggle(' + this.n_id + ')" onmouseover="trees[' + this.o_root.n_id + '].mover(' + this.n_id + ')" onmouseout="trees[' +this.o_root.n_id + '].mout(' + this.n_id + ')" class="t' + this.o_root.n_id + 'i" id="i_txt' + this.o_root.n_id + '_' + this.n_id +
'"><img src="' + this.get_icon() + '" border="0" align="absbottom" name="i_img' + this.o_root.n_id + '_' + this.n_id + '"
class="t' + this.o_root.n_id + 'im">' + this.a_config[0] + '</a></td></tr></table>' + (this.a_children.length ?
'<div id="i_div' + this.o_root.n_id + '_' + this.n_id + '" style="display:none"></div>' : '');
}
i tried to change:
<a href="' + this.a_config[1] + '" target="' + this.o_root.a_tpl['target'] + '" onclick="" ondblclick="trees[' + this.o_root.n_id+'].toggle(' + this.n_id + ')" onmouseover="trees[' + this.o_root.n_id + '].mover(' + this.n_id + ')" onmouseout="trees['+this.o_root.n_id + '].mout(' + this.n_id + ')" class="t' + this.o_root.n_id + 'i" id="i_txt' + this.o_root.n_id + '_' + this.n_id +
'"><img src="' + this.get_icon() + '" border="0" align="absbottom" name="i_img' + this.o_root.n_id + '_' + this.n_id + '"
class="t' + this.o_root.n_id + 'im">' + this.a_config[0] + '</a></td></tr></table>' + (this.a_children.length ?
'<div id="i_div' + this.o_root.n_id + '_' + this.n_id + '" style="display:none"></div>' : '');
didn't work!
is this the place , and what i have to change? please help
thanks a lot.
|
|
|
bird
Junior Member
Posts: 7
Registered: 2/14/2006
Member Is Offline
|
| posted on 2/15/2006 at 02:00 PM |
|
|
re
hi.
i found the answer , if somebody has another solutions i will be glad to see it .
her the changes i did :
+ '<a href="javascript:void(0);"' + '" target="' + this.o_root.a_tpl['target'] + '" onclick="return trees[' + this.o_root.n_id +'].select(' + this.n_id + ')" ondblclick="javascript:openWin(\''+this.a_config[1]+'\');trees[' + this.o_root.n_id + '].toggle(' +
this.n_id + ')" onmouseover="trees[' + this.o_root.n_id + '].mover(' + this.n_id + ')" onmouseout="trees[' + this.o_root.n_id + '].mout('
+ this.n_id + ')" class="t' + this.o_root.n_id + 'i" id="i_txt' + this.o_root.n_id + '_' + this.n_id + '"><img src="' +
this.get_icon() + '" border="0" align="absbottom" name="i_img' + this.o_root.n_id + '_' + this.n_id + '" class="t' + this.o_root.n_id +
'im">' + this.a_config[0] + '</a>
the function openWin should be in the main page.
bye.
|
|
|