This is a discussion on "Targetting two frames from one hyperlink" within the Web Page Design section. This forum, and the thread "Targetting two frames from one hyperlink are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Targetting two frames from one hyperlink
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Hi all,
Yes, I know frames are out of fashion but they're what I'm using until I sort out something better. Anyway, I have a fledgling site, currently at http://ccgi.paulyeoman.plus.com/sparkle/ This site has a header frame across the top and below that a sidebar frame on the left and a main content frame. Different product categories are accessed via the sidebar, and the target for the product pages is the main content frame. This all works fine, but what I would additionaly like to do is to place an image in the header frame representing the product category (basically move the header image from the main frame to the header frame). Thus when I click on 'bracelets', the bracelets page is displayed in the main frame and 'Sparkle Bracelets' will display in the header, and not scroll with the rest of the page. I'm using PHP for most of the site. Please have a look to see what I mean, and if anyone can tell me how I can do this I'd be very grateful! Don't try buying anything yet though! Also, any other tips are welcome. Thanks in advance, Paul |
|
|
|
#2
|
|||
|
|||
|
Re: Targetting two frames from one hyperlink
Why are you using frames if your also using php?
include function does wonders. |
|
#3
|
||||
|
||||
|
Re: Targetting two frames from one hyperlink
Yeah its more efficient to start using php includes, but I think what your looking for is this..
<a href="thepageyouwanttoload.html" target="framename">LINK</A> The frame that is the target is the new frame that the page will load in that you define in the "a href" code. Taking a quick look at your source the target should be target="leftFrame" if you want the new page to load in the left hand side. For more information regarding frames and loading pages in frames, I found a page from the W3C - http://www.w3.org/TR/REC-html40/present/frames.html Hope this helps Craig |
|
#4
|
|||
|
|||
|
Re: Targetting two frames from one hyperlink
Thanks guys for your suggestions.
The reason I'm using frames is that I don't know any better! I'm new to web design and I' just figuring everything out as I go along. I'll check out PHP inlcudes. Craig, I think I already have what you suggest, for example my link from the sidebar to the bracelets page is:
Ie, a single hyperlink is updating two different frames with two different PHP pages, but with one click. So I guess the hyperlink would need two targets. I'll check out the W3C docs for further info. Also I'll see if I can get soemthing working using PHP includes. Paul |
|
#5
|
|||
|
|||
|
An update on this. I looked at the W3C site and it looks like it isn't possible to update two separate frames at once with a single click.
The PHP include function looks promising, and I understand the principle and tested it. After searching it seems that all over the web there are examples of people saying that includes will remove the need for frames. However, every single example I saw had the whole damn page scrolling, including all the logos and navigation, so it seems that using includes my header and sidebar would scroll right up with the content! The main reason for using frames is not to have the navigation and headers scroll with the content. Maybe I'm missing something here... I did manage to find out about the CSS position: fixed rule, but that doesn't work with IE! Crazy! Surely with everyone going on about how useless frames are there'd be a way to emulate my simple 3-frame layout by some means... Any ideas? Thanks, Paul |
|
#6
|
|||
|
|||
|
Re: Targetting two frames from one hyperlink
Theres a solution. Add a link at the bottom of your content named to top or something, then when the user clicks it they got back to the top.
There is navigation which follows where you scroll but these are very buggy, slow and look crap |
![]() |
| Tags |
| targetting, two, frames, hyperlink |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to add hyperlink to flash(multiple frames) | mcnika | Flash & Multimedia Forum | 4 | Mar 20th, 2008 14:50 |
| Hyperlink Rollovers | crackafaza | Web Page Design | 3 | Aug 24th, 2007 11:43 |
| Hyperlink buttons | scoopslack | Flash & Multimedia Forum | 3 | Mar 8th, 2007 13:02 |
| Javascript Hyperlink | kato77 | JavaScript Forum | 1 | Feb 11th, 2006 12:14 |