PDA

View Full Version : Multiple iFrames



Nikola
08-21-2006, 09:20 AM
Hi everyone!

I have recently started using BlueVoda for designing webpages and I just love it! Unfortunatelly I am stuck with a problem.

Lets say I have a vertical navigation bar on the left and two iFrames on the main page. How can I achieve that when I click one item on the navigation bar, two different pages appear, each in its own iFrame? Is this possible?

Thanx!

Nikola

Nyoman
08-22-2006, 02:58 AM
Everything is possible ( I hope http://www.vodahost.com/vodatalk/images/icons/icon10.gif )
you can open multiple Iframe but you need javascript to do this.
Let's start with the simple one :

insert Iframe in your page (for sure you have to insert more than 1 IFrame)
Named your Iframe with whatever you want example one IFrame you called frameA and the other one is frameB
Now create navigation bar, button, text or whatever you want and in the link field you need to write this code:
http://www.yourdomain/page1.html" target="frameA" onclick="frameB.location.href='http://www.yourdomain/page2.html';

Change the page address with your real page
Done
That's simple, isn't it?

pemdas21
08-22-2006, 07:57 AM
wouldn't it be fun to have an Iframe that goes to another Iframe that goes back to the original Iframe? It would be like looking into a mirror that has a mirror behind you so you have like a million pictures you see. *do I hear a pc dying?*

Nikola
08-22-2006, 09:08 AM
Thanks a lot Nyoman!

angeliq
08-27-2006, 02:42 PM
can i use this code to open more than 2 frame?

bill2006
08-27-2006, 04:26 PM
Sorta helps if you all post your websites so we can see what it is you need help with.

davidundalicia
08-27-2006, 05:37 PM
Another small point is that the more I-frames you have the less the S.E´s will be able to view and therefore index your site.
Also when viewers wish to bookmark something, they will not always return to the page/i-frame they expected......
I-frames may appeal to some, but do you want a site that does the business
or just looks cool?????

angeliq
08-28-2006, 01:52 AM
I know this would be the answer. but the reason why i was asking is because i create website only as a hobby without counting that my web will be no.1 in search engine, i don't need that. although i see many website with frame they are leading on the top of the website without frame.Thank you for all the answer. always something new to learn everyday

Collectors-info
12-04-2006, 03:43 AM
Hi, would this be possible with 3 or more iframes??. I have tried this, but with no joy.


http://www.google.com" target="frameA" onclick="frameB.location.href='http://www.ebay.com" onclick="frameC.location.href'http://www.yahoo.com';

Cheers.

Andy128
12-04-2006, 06:16 AM
Chris-
I do not believe so. However, I believe it may be possible with the script / tutorial I wrote in the Tips/tricks section. I will give it a try and post what I find in the tutorial tomorrow.

Andy

Nyoman
12-04-2006, 09:28 AM
Hi all how are you???
Nice to see so many new voda member

back to the topic
Yes you can use the code above to open IFrame as many as you want, by adding frameC.location.href='http://www.yourdomain/page3.html'; and if you want more just add frameD.....;frameE.......; etc. so the code will be like this:



http://www.yourdomain/page1.html" target="frameA" onclick="frameB.location.href='http://www.yourdomain/page2.html';frameC.location.href='http://www.yourdomain/page3.html';


for bluevoda user use navigator bar, shape or image to open the link instead of text, because if you use text sometime the program didn't read this code

Try!!!!!!!!

Andy128
12-04-2006, 09:57 AM
Thanks Nyoman!! Always a pleasure to hear from ya.

Cheers-

Andy

Collectors-info
12-04-2006, 10:48 AM
Well done Nyoman, thanks for doing the example, I spent ages looking for that on the net.

Cheers,

PS. Andy! Maybe a little one to add to your help pages Andy? Cheers.