Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Problem using javascript in tree
axelsegers
Junior Member

Posts: 9
Registered: 6/1/2006
Location: belgium
Member Is Offline
posted on 6/6/2006 at 02:49 AM Reply With Quote
Problem using javascript in tree


I got a javascript error when using the following example

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

Howerver the menu is visually Ok, and the script 'openTrxHkt' is launched and working correctly i got a javascript error by loading the tree : Error ';' expected

I don't get the error when using
var TREE_ITEMS=[['my-test',0,null,['vlucht reserveren', "javascript:openTrxHkt(NCR$01,Dzb01,01);"],['nieuwe vlucht',"javascript:openTrxHkt(NCR$02,Dzb01,02);"],]]; ,
but in that case my javascript function 'openTrxHkt' fails on the first param.

Any idea how i can solve this?
Thanks a lot !
View User's Profile View All Posts By User U2U Member
axelsegers
Junior Member

Posts: 9
Registered: 6/1/2006
Location: belgium
Member Is Offline
posted on 6/7/2006 at 08:36 AM Reply With Quote

anyone an idea?

thanks
View User's Profile View All Posts By User U2U Member
axelsegers
Junior Member

Posts: 9
Registered: 6/1/2006
Location: belgium
Member Is Offline
posted on 6/9/2006 at 06:02 AM Reply With Quote
example


The example below works and shows an alert when clicking on the item 'overview', however i also got a javascript error ';' expected, did anyone got similar problems ? is javascript working for Tigra menu pro ?


var TREE_ITEMS=[['beheer',null,null,['overview', "javascript:alert('test');"],]];
var NAV_TREE = new tree (TREE_ITEMS, TREE_TPL,'testtree');
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 6/9/2006 at 09:17 AM Reply With Quote

avoid the commas in front of the closing brackets. Last element of the list should not have the comma after it.
View User's Profile View All Posts By User U2U Member
axelsegers
Junior Member

Posts: 9
Registered: 6/1/2006
Location: belgium
Member Is Offline
posted on 6/12/2006 at 02:26 AM Reply With Quote

I tried with

var TREE_ITEMS=[['beheer',null,null,['overview', "javascript:alert('test');"]]];

and this still results in the same error : ';' expected.
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 6/12/2006 at 06:27 PM Reply With Quote

I tried that with Tigra Tree Menu PRO and it worked just fine. Make sure you set target to '_self' in tree_tpl.js
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Multiple Trees
Frames Targeting
Icons and Styles Overloading
Event Handling
Performance Test
Version 1.2 features
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004