Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

executing multiple links on <a href> clicks

Posted on 1998-06-09
4
Medium Priority
?
215 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
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…

604 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