?
Solved

executing multiple links on <a href> clicks

Posted on 1998-06-09
4
Medium Priority
?
207 Views
Last Modified: 2006-11-17
I want to open 2 different pages in different frames on one click with one link ...

who could help me???
0
Comment
Question by:casii
[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
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 800 total points
ID: 1844165
<script>
function ChangeFrames() {
 parent.framename1.location = "newurl1.htm";
 parent.framename2.location = "newurl2.htm";
}
</script>

<a href="Javascript:ChangeFrames()"><test</a>
0
 
LVL 3

Expert Comment

by:bigelos
ID: 1844166
There are two ways of doing this:  One is to use JavaScript, the other is to use HTML.  Both ways have their pros and cons.

JavaScript is the easiest to implement, but doesn't work on browsers that have JavaScript turned off, and it messes up the BACK button on the browser.  You've seen the JavaScript solution.

You can find a working example at
http://members.tripod.com/~HTML_Expert/update_two_frames/1st_frame.html

Here is the HTML solution:
1st_frame.html:
---------------------------------------------------------
<html>

<head>
<title>New Page 2</title>
</head>

<frameset rows="64,*">
  <frame name="title" scrolling="no" noresize target="contents" src="page_1_top_frame.htm">
  <frameset cols="150,*">
    <frame name="contents" target="main" src="page_1_left_frame.htm">
    <frame name="main" src="page_1_right_frame.htm">
  </frameset>
  <noframes>
  <body>
  <p>This page uses frames, but your browser doesn't support them.</p>
  </body>
  </noframes>
</frameset>
</html>
-------------------------------------------------------------

page_1_right_frame.htm
-------------------------------------------------------------
<html>

<head>
<title>Page 1 right frame</title>
</head>

<body>

<p>Page 1 right frame</p>
</body>
</html>
----------------------------------------------------------

page_1_top_frame.htm
----------------------------------------------------------
<html>

<head>
<title>Page 1 top frame</title>
<base target="contents">
</head>

<body>

<p>Page 1 top frame</p>
</body>
</html>
------------------------------------------------------------

page_1_left_frame.htm
------------------------------------------------------------
<html>

<head>
<title>Page 1 left frame</title>
</head>

<body>

<p>Page 1 left frame</p>
<a href="2nd_frame.html" target="_top">Link</A>
</body>
</html>
--------------------------------------------------------------

2nd_frame.html
--------------------------------------------------------------
<html>

<head>
<title>New Page 6</title>
</head>

<frameset rows="64,*">
  <frame name="banner" scrolling="no" noresize target="contents" src="page_2_top_frame.htm">
  <frameset cols="150,*">
    <frame name="contents" target="main" src="page_2_left_frame.htm">
    <frame name="main" src="page_2_right_frame.htm">
  </frameset>
  <noframes>
  <body>
  <p>This page uses frames, but your browser doesn't support them.</p>
  </body>
  </noframes>
</frameset>
</html>
-----------------------------------------------------------

page_2_top_frame.htm
-----------------------------------------------------------
<html>

<head>
<title>Page 2 top frame</title>
<base target="contents">
</head>

<body>

<p>Page 2 top frame</p>
</body>
</html>
-----------------------------------------------------------

page_2_left_frame.htm
-----------------------------------------------------------
<html>

<head>
<title>Page 2 left frame</title>
<base target="main">
</head>

<body>

<p>Page 2 left frame</p>
<a href="1st_frame.html" target="_top">Link</A>
</body>
</html>
-----------------------------------------------------------

page_2_right_frame.htm
-----------------------------------------------------------
<html>

<head>
<title>Page 2 right frame</title>
</head>

<body>

<p>Page 2 right frame</p>
</body>
</html>
---------------------------------------------------------


0
 
LVL 3

Expert Comment

by:bigelos
ID: 1844167
The working example is the HTML solution....
0
 

Author Comment

by:casii
ID: 1844168
VERY BIG THANX TO BOTH OF YOU ... !!!
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

770 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