Targetting two frames from one hyperlink

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.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Feb 11th, 2006, 00:39
New Member
Join Date: Jan 2006
Age: 29
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Question Targetting two frames from one hyperlink

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Feb 11th, 2006, 01:40
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Targetting two frames from one hyperlink

Why are you using frames if your also using php?

include function does wonders.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Feb 11th, 2006, 03:47
craig's Avatar
Reputable Member
Join Date: Sep 2005
Location: Preston, UK
Age: 21
Posts: 382
Thanks: 0
Thanked 0 Times in 0 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Feb 11th, 2006, 19:50
New Member
Join Date: Jan 2006
Age: 29
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
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:
Code: Select all
<a href="products.php?type=bracelet" target="mainFrame">Bracelets</a><br>
, so that the main frame updates. What I'd like to do is update the header frame as well, with one click, ie the header will be a PHP page and passing the bracelet parameter will display the bracelet header image in the header.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Feb 11th, 2006, 21:07
New Member
Join Date: Jan 2006
Age: 29
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Re: Targetting two frames from one hyperlink

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Feb 11th, 2006, 21:41
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
targetting, two, frames, hyperlink

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 08:51.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42