Link to home
Start Free TrialLog in
Avatar of casii
casii

asked on

executing multiple links on <a href> clicks

I want to open 2 different pages in different frames on one click with one link ...

who could help me???
ASKER CERTIFIED SOLUTION
Avatar of sybe
sybe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bigelos
bigelos

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>
---------------------------------------------------------


The working example is the HTML solution....
Avatar of casii

ASKER

VERY BIG THANX TO BOTH OF YOU ... !!!