Linking to more thn one frame at one time
Hi!
I have a probem. I nead to linkk to two frmes at one time.
I.E. Open a new menu and mainFrame.
Any Ideas
Hi!
I have a probem. I nead to linkk to two frmes at one time.
I.E. Open a new menu and mainFrame.
Any Ideas
yabber posted this at 13:21 — 19th January 2002.
They have: 93 posts
Joined: Dec 2001
I think the best way would be to link to a new frameset.
Mika
taff posted this at 13:46 — 19th January 2002.
They have: 956 posts
Joined: Jun 2001
like so?
a Href="thisframe.html" onclick="parent.thatframe.location.href = 'thatframe.html';"
The Webmistress posted this at 15:13 — 19th January 2002.
She has: 5,586 posts
Joined: Feb 2001
Are the two new pages to open within the constraints of the frameset in which the link is? You want to change two pages from one click?
Jack Michaelson posted this at 16:23 — 20th January 2002.
He has: 1,733 posts
Joined: Dec 1999
If that's what you need try this:
Put this in the HEAD section of your HTMLdoc:
<script language="javascript">
function change2frames(var1, var2)
{
parent.main.location=var1;
parent.menu.location=var2;
}</script>
and...
Put this in the BODY desction of your HTMLdoc:
<a href="javascript: change2frames('main2.html','menu2.html');">click</a>
[EDIT] Somehow the server puts a space between 'java' and 'script'(in the href). This should be 'javascript' ofcourse...[/EDIT]
Hope it helps,
Shakespeare: onclick || !(onclick)
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.