JacovT
Junior Member
Posts: 5
Registered: 11/5/2004
Location: Midrand, South Africa
Member Is Offline
|
| posted on 11/5/2004 at 08:17 AM |
|
|
Using functions in Link element?
Hi,
I was wondering, is it possible to use a function, say gotoLink() in the Link element of the Tree array?
I want to call the function like this:
[Item 1, gotoLink('Item1','http://i.am.link1/'),null]
Do note that there is more than 1 parameter passed to the function, and it seems that the comma is screwing things up a bit.
Any suggestions/workarounds?
Thank you in advance.
---JacovT
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 11/5/2004 at 11:11 AM |
|
|
The correct syntax would be:
['Item 1', "javascript:gotoLink('Item1','http://i.am.link1/')",null]
|
|
|
JacovT
Junior Member
Posts: 5
Registered: 11/5/2004
Location: Midrand, South Africa
Member Is Offline
|
| posted on 11/5/2004 at 11:52 AM |
|
|
Working, thanks!
Rock,
Thank you for your quick response.
This works like a charm. Thanks for pointing out what the correct syntax is.
---JacovT
|
|
|