Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > I need help with Frames and iFrames...

I need help with Frames and iFrames...
Thread Tools
Fresh-Faced Recruit
Join Date: Aug 2002
Location: London
Status: Offline
Reply With Quote
Nov 5, 2002, 05:54 PM
 
Hi all,

I got 3 frames Top Middle and Bottom and I need to be able to click a link in the Top Frame with the Middle Frame to change and a iFrame in the Bottom Frame to chage too.

I'm sure it's possible but can't figure it out.

I have done a search but can't find anything on it.

Can someone help?

Kia.
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Nov 5, 2002, 09:07 PM
 
Originally posted by wwwkianoushcom:
Hi all,

I got 3 frames Top Middle and Bottom and I need to be able to click a link in the Top Frame with the Middle Frame to change and a iFrame in the Bottom Frame to chage too.

I'm sure it's possible but can't figure it out.

I have done a search but can't find anything on it.

Can someone help?

Kia.
OK... I'll bite...

It needs to be done with Javascript because you're targetting 3 windows.

So your window names are 'top','middle' and 'bottom'. and the iFrame within the 'bottom' window is called 'iframe' (for simplicity's sake!).

Your HTML code may look something like this:

Code:
< a href="javascript:changeFrame('middlepage.html','iframepage.html')" >Click here< /a >
Then you'll need a javascript inside your page (or linked from an external file) which has something like this:-

Code:
function changeFrame(page1,page2) { top.middle.href.location = page1; top.bottom.iframe.href.location = page2; }
I'm doing this all from memory (and sometimes I think I was given bad ram at birth) so it may need some tweaking. It's a start, though

Good luck.
Computer thez nohhh...
     
   
Thread Tools
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -5. The time now is 06:17 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2