0

Hi I'm wondering if it's possible to link to another page's specific frame and I still want the other frames to be visible.

For example: i have a site: example.com and I want to link to anotherexample.com that has one frame for the menu and one for the page.
Is it possible to link to a subpage and still have the menu frame visible?

Patrik
  • 2,207
  • 3
  • 30
  • 48

2 Answers2

0

For Frame :

<FRAMESET>
  <FRAME SRC="Entete.html" >
  <FRAMESET >
  <FRAME SRC="Menu.html">
  <FRAME SRC="inslien.html" NAME="frameA">
  </FRAMESET>
</FRAMESET> 

<A HREF="http://whateveryouwant.com" TARGET="frameA"> 

For Iframe :With Javascript you can

var myf = document.getElementById("myiframe");
myf.src = "http://anotherexample.com";

iframe A must be in the same domain of frame parent to be able to modify iframe B src

Christophe Debove
  • 6,088
  • 20
  • 73
  • 124
  • Is there any difference between the behavior of frames and iframes? Because the site I'm going to link to has around 5000 pages and could do a search and replace. What will I gain by changing to iframes? thanks. – Patrik Dec 09 '11 at 10:20
  • I refer you to http://stackoverflow.com/questions/1079128/whats-the-difference-between-iframe-and-frame – Christophe Debove Dec 09 '11 at 10:34
0

It’s not possible. It is an inherent feature of frames in HTML, and often mentioned as a fundamental problem with them, that a combination of frame contents (“state of a frameset”) has no URL of its own.

There’s a workaround that may be applicable in simple cases: construct a small frameset page of your own, imitating the site to be linked to. Include the header, navigation, and other frames that have the same content over the linked site, using absolute URLs that correspond to those on the linked site. Using server-side or client-side technology, make your page URL work with a query part that contains the name of a specific content to be displayed in the content frame. And you would then link to this frameset page of yours, with varying query parts as needed.

This wouldn’t handle any changes in the navigation frame (such as showing the current page as a non-link or as highlighted), though this could be accommodated with extra code along the same lines.

The workaround would be fragile (changes in the linked site can easily mess it up) and might raise copyright issues.

Jukka K. Korpela
  • 195,524
  • 37
  • 270
  • 390