Solved

Double Link

Posted on 1998-10-27
5
187 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

813 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

18 Experts available now in Live!

Get 1:1 Help Now