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

x
?
Solved

Frames

Posted on 1998-08-11
2
Medium Priority
?
190 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
[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 Comments
 
LVL 28

Accepted Solution

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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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 embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

618 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