Solved

executing multiple links on <a href> clicks

Posted on 1998-06-09
4
161 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
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 200 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
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…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

758 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

17 Experts available now in Live!

Get 1:1 Help Now