Board Logo

Error in TreeItems
pontiac - 5/11/2005 at 03:42 PM

Hello,
I purchase pro version of Tigra Tree Menu.
I'm trying to build on the fly from a php webserver the tree_items.js.
But the browser give always the same error "Mising }".

This is my tree items generate from php:

var TREE_ITEMS = [ ['Struttura Impianto','rootpage.php?ps=open&kind=ROOT&id=0',{'tw': 'impianto','st': 1,'i0':'','i4':', 'i8':'','i12':'','i64':', 'i68':'','i72':'','i76':''},
['Default','',{'tw': 'impianto','st': 1,'i0':'../img/authgroup16.gif','i4':../img/authgroup16.gif', 'i8':'../img/authgroup16.gif','i12':'../img/authgroup16.gif','i64':../img/authgroup16.gif', 'i68':'../img/authgroup16.gif','i72':'../img/authgroup16.gif','i76':'../img/authgroup16.gif'},
['WD 3000: 192.168.1.190','httppage.php?ps=open&kind=HTTPADAPTER&id=1001',{'tw': 'impianto','st': 1,'i0':'../img/httpadapter16.gif','i4':../img/httpadapter16.gif', 'i8':'../img/httpadapter16.gif','i12':'../img/httpadapter16.gif','i64':../img/httpadapter16.gif', 'i68':'../img/httpadapter16.gif','i72':'../img/httpadapter16.gif','i76':'../img/httpadapter16.gif'},
['WD 3000','terminalpage.php?ps=open&kind=TERMINAL&id=301',{'tw': 'impianto','st': 1,'i0':'../img/s_wd3000_16.gif','i4':../img/s_wd3000_16.gif', 'i8':'../img/s_wd3000_16.gif','i12':'../img/s_wd3000_16.gif','i64':../img/s_wd3000_16.gif', 'i68':'../img/s_wd3000_16.gif','i72':'../img/s_wd3000_16.gif','i76':'../img/s_wd3000_16.gif'},
['Testa Ingresso palazzo','headpage.php?ps=open&kind=HEAD&id=601',{'tw': 'impianto','st': 1,'i0':'../img/testadilettura.gif','i4':../img/testadilettura.gif', 'i8':'../img/testadilettura.gif','i12':'../img/testadilettura.gif','i64':../img/testadilettura.gif', 'i68':'../img/testadilettura.gif','i72':'../img/testadilettura.gif','i76':'../img/testadilettura.gif'}],
['Testa uscita edificio','headpage.php?ps=open&kind=HEAD&id=701',{'tw': 'impianto','st': 1,'i0':'../img/testadilettura.gif','i4':../img/testadilettura.gif', 'i8':'../img/testadilettura.gif','i12':'../img/testadilettura.gif','i64':../img/testadilettura.gif', 'i68':'../img/testadilettura.gif','i72':'../img/testadilettura.gif','i76':'../img/testadilettura.gif'}],
['Testa parcheggio','headpage.php?ps=open&kind=HEAD&id=801',{'tw': 'impianto','st': 1,'i0':'../img/testadilettura.gif','i4':../img/testadilettura.gif', 'i8':'../img/testadilettura.gif','i12':'../img/testadilettura.gif','i64':../img/testadilettura.gif', 'i68':'../img/testadilettura.gif','i72':'../img/testadilettura.gif','i76':'../img/testadilettura.gif'}],
['Testa porta legno','headpage.php?ps=open&kind=HEAD&id=901',{'tw': 'impianto','st': 1,'i0':'../img/testadilettura.gif','i4':../img/testadilettura.gif', 'i8':'../img/testadilettura.gif','i12':'../img/testadilettura.gif','i64':../img/testadilettura.gif', 'i68':'../img/testadilettura.gif','i72':'../img/testadilettura.gif','i76':'../img/testadilettura.gif'}],
],],
['MANUALE: 192.168.0.71','httppage.php?ps=open&kind=HTTPADAPTER&id=1201',{'tw': 'impianto','st': 1,'i0':'../img/httpadapter16.gif','i4':../img/httpadapter16.gif', 'i8':'../img/httpadapter16.gif','i12':'../img/httpadapter16.gif','i64':../img/httpadapter16.gif', 'i68':'../img/httpadapter16.gif','i72':'../img/httpadapter16.gif','i76':'../img/httpadapter16.gif'},
['Test Per Manuale','terminalpage.php?ps=open&kind=TERMINAL&id=401',{'tw': 'impianto','st': 1,'i0':'../img/s_wd3000_16.gif','i4':../img/s_wd3000_16.gif', 'i8':'../img/s_wd3000_16.gif','i12':'../img/s_wd3000_16.gif','i64':../img/s_wd3000_16.gif', 'i68':'../img/s_wd3000_16.gif','i72':'../img/s_wd3000_16.gif','i76':'../img/s_wd3000_16.gif'},
['a','headpage.php?ps=open&kind=HEAD&id=1001',{'tw': 'impianto','st': 1,'i0':'../img/testadilettura.gif','i4':../img/testadilettura.gif', 'i8':'../img/testadilettura.gif','i12':'../img/testadilettura.gif','i64':../img/testadilettura.gif', 'i68':'../img/testadilettura.gif','i72':'../img/testadilettura.gif','i76':'../img/testadilettura.gif'}],
['b','headpage.php?ps=open&kind=HEAD&id=1101',{'tw': 'impianto','st': 1,'i0':'../img/testadilettura.gif','i4':../img/testadilettura.gif', 'i8':'../img/testadilettura.gif','i12':'../img/testadilettura.gif','i64':../img/testadilettura.gif', 'i68':'../img/testadilettura.gif','i72':'../img/testadilettura.gif','i76':'../img/testadilettura.gif'}],
['c','headpage.php?ps=open&kind=HEAD&id=1201',{'tw': 'impianto','st': 1,'i0':'../img/testadilettura.gif','i4':../img/testadilettura.gif', 'i8':'../img/testadilettura.gif','i12':'../img/testadilettura.gif','i64':../img/testadilettura.gif', 'i68':'../img/testadilettura.gif','i72':'../img/testadilettura.gif','i76':'../img/testadilettura.gif'}],
['d','headpage.php?ps=open&kind=HEAD&id=1301',{'tw': 'impianto','st': 1,'i0':'../img/testadilettura.gif','i4':../img/testadilettura.gif', 'i8':'../img/testadilettura.gif','i12':'../img/testadilettura.gif','i64':../img/testadilettura.gif', 'i68':'../img/testadilettura.gif','i72':'../img/testadilettura.gif','i76':'../img/testadilettura.gif'}],
],],
['TEST1: 120.120.10.10','httppage.php?ps=open&kind=HTTPADAPTER&id=1301',{'tw': 'impianto','st': 1,'i0':'../img/httpadapter16.gif','i4':../img/httpadapter16.gif', 'i8':'../img/httpadapter16.gif','i12':'../img/httpadapter16.gif','i64':../img/httpadapter16.gif', 'i68':'../img/httpadapter16.gif','i72':'../img/httpadapter16.gif','i76':'../img/httpadapter16.gif'},
['test fax','terminalpage.php?ps=open&kind=TERMINAL&id=501',{'tw': 'impianto','st': 1,'i0':'../img/s_wd3000_16.gif','i4':../img/s_wd3000_16.gif', 'i8':'../img/s_wd3000_16.gif','i12':'../img/s_wd3000_16.gif','i64':../img/s_wd3000_16.gif', 'i68':'../img/s_wd3000_16.gif','i72':'../img/s_wd3000_16.gif','i76':'../img/s_wd3000_16.gif'},
['a','headpage.php?ps=open&kind=HEAD&id=1401',{'tw': 'impianto','st': 1,'i0':'../img/testadilettura.gif','i4':../img/testadilettura.gif', 'i8':'../img/testadilettura.gif','i12':'../img/testadilettura.gif','i64':../img/testadilettura.gif', 'i68':'../img/testadilettura.gif','i72':'../img/testadilettura.gif','i76':'../img/testadilettura.gif'}],
['b','headpage.php?ps=open&kind=HEAD&id=1501',{'tw': 'impianto','st': 1,'i0':'../img/testadilettura.gif','i4':../img/testadilettura.gif', 'i8':'../img/testadilettura.gif','i12':'../img/testadilettura.gif','i64':../img/testadilettura.gif', 'i68':'../img/testadilettura.gif','i72':'../img/testadilettura.gif','i76':'../img/testadilettura.gif'}],
['c','headpage.php?ps=open&kind=HEAD&id=1601',{'tw': 'impianto','st': 1,'i0':'../img/testadilettura.gif','i4':../img/testadilettura.gif', 'i8':'../img/testadilettura.gif','i12':'../img/testadilettura.gif','i64':../img/testadilettura.gif', 'i68':'../img/testadilettura.gif','i72':'../img/testadilettura.gif','i76':'../img/testadilettura.gif'}],
['d','headpage.php?ps=open&kind=HEAD&id=1701',{'tw': 'impianto','st': 1,'i0':'../img/testadilettura.gif','i4':../img/testadilettura.gif', 'i8':'../img/testadilettura.gif','i12':'../img/testadilettura.gif','i64':../img/testadilettura.gif', 'i68':'../img/testadilettura.gif','i72':'../img/testadilettura.gif','i76':'../img/testadilettura.gif'}],
],],
['ISOBIO: a','httppage.php?ps=open&kind=HTTPADAPTER&id=2101',{'tw': 'impianto','st': 1,'i0':'../img/httpadapter16.gif','i4':../img/httpadapter16.gif', 'i8':'../img/httpadapter16.gif','i12':'../img/httpadapter16.gif','i64':../img/httpadapter16.gif', 'i68':'../img/httpadapter16.gif','i72':'../img/httpadapter16.gif','i76':'../img/httpadapter16.gif'},
['aa','terminalpage.php?ps=open&kind=TERMINAL&id=2201',{'tw': 'impianto','st': 1,'i0':'../img/s_isobio_16.gif','i4':../img/s_isobio_16.gif', 'i8':'../img/s_isobio_16.gif','i12':'../img/s_isobio_16.gif','i64':../img/s_isobio_16.gif', 'i68':'../img/s_isobio_16.gif','i72':'../img/s_isobio_16.gif','i76':'../img/s_isobio_16.gif'},
['aa','headpage.php?ps=open&kind=HEAD&id=2001',{'tw': 'impianto','st': 1,'i0':'../img/s_fingerprints_16.gif','i4':../img/s_fingerprints_16.gif', 'i8':'../img/s_fingerprints_16.gif','i12':'../img/s_fingerprints_16.gif','i64':../img/s_fingerprints_16.gif', 'i68':'../img/s_fingerprints_16.gif','i72':'../img/s_fingerprints_16.gif','i76':'../img/s_fingerprints_16.gif'}],
]]],['Gruppo 2','',{'tw': 'impianto','st': 1,'i0':'../img/authgroup16.gif','i4':../img/authgroup16.gif', 'i8':'../img/authgroup16.gif','i12':'../img/authgroup16.gif','i64':../img/authgroup16.gif', 'i68':'../img/authgroup16.gif','i72':'../img/authgroup16.gif','i76':'../img/authgroup16.gif'},]
]];


Can you help me?
I didn't find the syntax error. Thanks in Advance


rock - 5/12/2005 at 06:57 AM

You've missed quote sign when defining 'i4' and 'i64' within all items.
Incorrect:
{.., 'i4':../img/authgroup16.gif',.., 'i64':../img/authgroup16.gif',..}

Compare correct:
{.., 'i4':'../img/authgroup16.gif',.., 'i64':'../img/authgroup16.gif',..}


pontiac - 5/12/2005 at 08:59 AM

Thank you very much!!!!
Bye P.


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