Solved

Double Link

Posted on 1998-10-27
5
166 Views
Last Modified: 2010-04-09
I am the middle of making a page at the moment that uses frames. I have
a navigation frame and two others  and I would like to be able to make 1
link in the navigation frame open 2 different documents in the other two
frames. Is this possible? If so, how ?
0
Comment
Question by:Bishma
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:martinag
ID: 1839088
<SCRIPT LANGUAGE="JavaScript">
<!--
function openFrames(a, b);
parent.FIRSTFRAME.location.href = a;
parent.SECONDFRAME.location.href = b;
// -->
</SCRIPT>
<A HREF="openFrames('page1.htm', 'page2.htm')">Link</A>

I guess you have named your frames:
<FRAME NAME="whatever" SRC="something.htm">

Martin
0
 

Author Comment

by:Bishma
ID: 1839089
This brings up an error cannot find "openFrames('chsr2.html','main.html')"
The documents exist in that directory.
I tryed adding "javascript:" to the front (ie "javascript:openFrames(....") and then it just told me that the document was done without doing anything.
The frames I am trying to change are named "stuff" and "main"

If you could elobrate a little it would help me out. I am a novice when it comkes to javascript.
0
 

Author Comment

by:Bishma
ID: 1839090
This brings up an error cannot find "openFrames('chsr2.html','main.html')"
The documents exist in that directory.
I tryed adding "javascript:" to the front (ie "javascript:openFrames(....") and then it just told me that the document was done without doing anything.
The frames I am trying to change are named "stuff" and "main"

If you could elobrate a little it would help me out. I am a novice when it comkes to javascript.
0
 
LVL 4

Accepted Solution

by:
martinag earned 100 total points
ID: 1839091
Ok, here it is. I forgot the {}'s. I've also changed your frame names.

<SCRIPT LANGUAGE="JavaScript">
<!--
function openFrames(a, b) {
  parent.stuffs.location.href = a;
  parent.main.location.href = b;
}
// -->
</SCRIPT>

And you're right about the "javascript:" I forgot that. The clock is running towards midnight at my side of the globe and I better go sleep.

Martin
0
 

Author Comment

by:Bishma
ID: 1839092
Worked like a charm.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now