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
Solved

Frames

Posted on 1998-08-11
2
185 Views
Last Modified: 2012-05-04
Supose I have 4 frames like this:

<FRAMESET  FRAMEBORDER="0" BORDER="0" FRAMESPACING="0" rows="50,*">
 <FRAMESET COLS="36%,*" FRAMEBORDER=0 BORDER="0" FRAMESPACING="0">
  <FRAME NAME="headframeleft" SRC="header1.htm"  NORESIZE SCROLLING="no">
  <FRAME NAME="headframeright" SRC="header2.htm"  NORESIZE SCROLLING="no">
 </FRAMESET>
 <FRAMESET COLS="36%,*" FRAMEBORDER=0 BORDER="0" FRAMESPACING="0">
  <FRAME NAME="bodyframeleft" SRC="content.htm" MARGINWIDTH="2" MARGINHEIGHT="2">
  <FRAME NAME="bodyframeright" SRC="result.htm">
 </FRAMESET>
</FRAMESET>

In bodyframeleft I have several links that open a different page in bodyframeright, with the "TARGET=bodyframeright" tag

What I want to know is how I can open another page in headframeright when I click the link in bodyframeleft. That is, open two different pages in two frames at the same time.
Thanks...
0
Comment
Question by:carflores
2 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 100 total points
ID: 1845196
You have two options:

1. use javascript:
=======================
<script>
function ChangeTwoFrames() {
  parent.frames['bodyframeright'].location = 'anotherpage1.htm';
  parent.frames['headframeright'].location = 'anotherpage2.htm';
}

</script>

<a href="Javascript:ChangeTwoFrames()"><clicke here</a>

===========

2. redefine your frames into 3 seperate html files
==================================================

frame 1:

<FRAMESET  FRAMEBORDER="0" BORDER="0" FRAMESPACING="0" rows="50,*">
      <FRAME NAME="headframe" SRC="headerframe.htm"  NORESIZE SCROLLING="no">
      <FRAME NAME="bodyframe" SRC="body.htm"  NORESIZE SCROLLING="no">
</FRAMESET>

frame 2:

<FRAMESET COLS="36%,*" FRAMEBORDER=0 BORDER="0" FRAMESPACING="0">
      <FRAME NAME="headframeleft" SRC="header1.htm"  NORESIZE SCROLLING="no">
      <FRAME NAME="headframeright" SRC="header2.htm"  NORESIZE SCROLLING="no">
</FRAMESET>

frame 3:

<FRAMESET COLS="36%,*" FRAMEBORDER=0 BORDER="0" FRAMESPACING="0">
      <FRAME NAME="bodyframeleft" SRC="content.htm" MARGINWIDTH="2" MARGINHEIGHT="2">
      <FRAME NAME="bodyframeright" SRC="result.htm">
</FRAMESET>


Now each frame has a name and each frameset has a name and you can refer to that with the "target" option:

<a href="anotherframeset.htm" target="bodyframe">
0
 

Author Comment

by:carflores
ID: 1845197
I used JavaScript option.... Thanks.
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

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

791 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