Linking to more thn one frame at one time

They have: 2 posts

Joined: Jan 2002

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
Cheers!

They have: 93 posts

Joined: Dec 2001

I think the best way would be to link to a new frameset.

Mika

taff's picture

They have: 956 posts

Joined: Jun 2001

like so?

a Href="thisframe.html" onclick="parent.thatframe.location.href = 'thatframe.html';"

The Webmistress's picture

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's picture

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.