TreeWidget and Javascript

I'm using the TreeWidget in a espace and I want to open the link in a Iframe in the same page with several input parameters wich I put in url of each node.

How can I do this?
I need to use javascript to open this in the same page in a Iframe?
How can I pass the parameters from server to javascript?

Hi Rui,

Some steps that may help you:

- Define your iframe using an unescaped expression. Make sure it has an Id attribute (ex: Id='myIFrame').

- On each tree node, you'll have to execute a javascript function in order to open the link in the iframe. Check the sample in the solution (follow the Try It Now link).

- You may add javascript code in two ways (check the 'Click Me' and the 'BSG 2004' nodes). One uses the Label field, the other uses the URL field for injecting JS code.

- For opening the link in the iframe, you'll have to use something like this on your javascript code:
frames['myIFrame'].location.href = ''

- Append specific parameters to each node. Ex:
frames['myIFrame'].location.href ='

Hope this helps.
Create a expression with:

- Escape content = no

- and with the following expression:
"<IFRAME id='cfgiframe' name='cfgiframe' frameborder=0 src='" + IFrameURL + "' width=100% scrolling='no' frameborder='0'></IFRAME>"

where IFrameURL is a input variable with the url (that can be relative or not) that you want to open inside the iFrame.

Example: if IFrameURL="example.aspx" that webpage will open inside the iFrame.

On each tree node you can make a link for the current page and send the iFrame url as parameter.
hey Paulo Ramos,
frames['myIFrame'].location.href = ''

Does it works with relative links? If not how can i work with relative links instead? like making a link to a webflow named "example.aspx"

Im trying to do a left side menu with jsTree opening the web pages in a right side iFrame, but i dont lose the "path" that ive done in the left menu. :S