Board Logo

problems launching javascript from a menu item
axelsegers - 6/1/2006 at 07:26 AM

I have the following tree structure

var TREE_ITEMS=[['Test-Air','/',null,['vlucht reserveren', "javascript:openTrxHkt('NCR$01','Dzb01','01');"],['nieuwe vlucht',"javascript:openTrxHkt('NCR$02','Dzb01','02');"],]];

If i click on a menu item , it opens a new window with javascript:openTrxHkt('NCR$01','Dzb01','01'); in the address bar. It seems that it doesn't execute the script in the main window , but just launch a new window with the script to execute in it. How can i solve this?

thanks !


tigra - 6/1/2006 at 09:20 AM

make sure the target is set to _self for items launching the javascript.


axelsegers - 6/1/2006 at 09:21 AM

Thanks, where can i define the target?


tigra - 6/1/2006 at 03:42 PM

you define it globally in tree_tpl.js (key 'target'), in PRO version you can redefine that locally for each item in tree_items.js (key 'tw')


axelsegers - 6/6/2006 at 05:28 AM

Thx this works fine


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/