Solved

Double Link

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
After moving to webstite page stopped working 7 85
Simple Angular 2 login page 4 70
Asp.net mvc foreach 3 32
insert text field data into html script 13 18
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.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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…

930 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

9 Experts available now in Live!

Get 1:1 Help Now