Borax
Newbie
Posts: 1
Registered: 3/25/2005
Member Is Offline
|
| posted on 3/25/2005 at 09:51 PM |
|
|
linkink to both new page and an iframe in the new page
Hi
I try to do the following:
I have a simple html page, with Tigra menu. One of the menu buttons is linking to another html page, wich has an iframe. I want to specifie the src of
this iframe too with the menu button.
I don' want to use PHP, i need a solution in Javascript.
I tryed to do somthing like this(it was here in some old topic):
in menu_items.js:
for the button:
['other html', "javascript:nw('html.htm', 'iframe.htm')", {'tw':'_self'}],
and under all:
function nw(url, iframeurl, name) {
window.open(url,(name ? name : '_self'), null);
window.open(iframeurl,(name ? name : 'iframe_name'), null);
}
but i don't know how to add that the iframe is in the new url, not in the root page.
Thanks,
Bx
|
|
|
tigra
Administrator
Posts: 1990
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 3/30/2005 at 08:27 PM |
|
|
In your menu item, you can specify link to the page, which has an iframe, with URL for iframe as a parameter. Then within onload event handler you
parse the URL and load iframe with your custom Javascript code.
|
|
|
|