PDA

View Full Version : HELP iframe scroller and links



jpri
11-21-2006, 09:36 AM
1) Script Title: IFRAME scroller

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/iframe-scroller.htm

3) Describe problem:
Please, help. I have loaded your Iframe scroller in mainFrameA of FrSet A.
How can I address to the same mainFrameA a link to page C that opens through NavBar in mainFrameB of FrSet B?
Here the map: SITE: FrSetA.htm -> FrSetB.htm -> HOME -> FOLDER -> PageC.htm.
Is it possible?
Thank you for your help.
jpri

jscheuer1
11-21-2006, 06:23 PM
Use the target attribute of the link to target a named frame. This will usually work no matter where that frame is (be it an iframe or a frameset frame, above or below the link) as long as the name is unique and the frame exists when the link is clicked, it should work. Example:


<iframe name="mainFrameA" . . .

OR:


<frame name="mainFrameA" . . .

with:


<a href="pageC.htm" target="mainFrameA">Page C</a>

jpri
11-22-2006, 07:18 AM
Thank you, John. I'm afraid I was not clear with my question.

The problem is that PageC and the others I would like to link in the scroller are structured to appear WITHIN FrSetB and therefore fit badly in mainFrameA.
I.e., FrSetB is the main part of the site, with navbar, links etc., while FrSetA with the news scroller is an opening page that only gives access to two different version of the site.

In sythesis, from the scroller links (in FrSetA) I would open a different frameset (FrSetB) which in turn shows in its mainFrameB PageC or D etc.

I hope to have better explained myself. And thank you again.
jpri

jscheuer1
11-22-2006, 07:30 AM
The principal is still the same. Let's say you want a new frameset to open in an existing frame. Your link will have the href of the new frameset, and its target will be the existing frame.

If, on the other hand, you want a link inside a frame to open up in the window, obliterating everything else, target _top:


<a href="new_frameset.htm" target="_top">New Frameset</a>

The src attributes of the frames on the new_frameset.htm will determine what is shown in its frames. You can have several versions of the new frameset, each with its own name and configured to show a particular set of sub-pages in its frames.

jpri
11-22-2006, 05:48 PM
I'll follow your suggestion. Thank you again.