On my main web page, I have a button that opens a browser window, this window contains a tree menu created with JS.

What I need to know is if I click on a link in the tree menu, is it possible to comunicate with the main page in such a way, that the main page follows the link and not the browser Window? If so, how?

Member Avatar for iamthwee

What are you trying to do?

Add html address links to your javascript tree?

What are you trying to do?

Add html address links to your javascript tree?

yes!

Html page has a link that opens the window with the javascript tree, obviously this is a menu, I need this menu to control the main HTML Page.

Forgot to mention that the JS tree has been placed in a <div> tag in an HTML page.

It works ordinarily, but now it is in a browser window, and if i navigate noremally, it will continue to browse in that window, which is not what I want.

I know in HTML it would be "_parent" but this is a JS menu.

You can refer to the parent window via JavaScript as "opener".

However, if your JS menu simply contains/builds hyperlinks, you can still use the "target" attribute within those links, can't you?

You can also specify <base target="_parent"> within the header on the page, so that all hyperlinks go to the parent page.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.