Board Logo

Using functions in Link element?
JacovT - 11/5/2004 at 08:17 AM


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',''),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.


rock - 11/5/2004 at 11:11 AM

The correct syntax would be:
['Item 1', "javascript:gotoLink('Item1','')",null]

JacovT - 11/5/2004 at 11:52 AM


Thank you for your quick response.

This works like a charm. Thanks for pointing out what the correct syntax is.


Back to forum: