Solved

executing multiple links on <a href> clicks

Posted on 1998-06-09
4
195 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 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
html input 8 56
Fix Form size HTML 16 31
email validation 9 49
Jquery HTML() with ajax... replacing content 2 30
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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?
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

733 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