Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Double Link

Posted on 1998-10-27
5
Medium Priority
?
219 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

670 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