Forum Moderators: open

Message Too Old, No Replies

Help with iFrame implementation

ask fo help showing new iframes on the same page

         

tazman

7:59 am on May 31, 2003 (gmt 0)

10+ Year Member



On designing a new site, I decided to break out of tables and use ifames for each element. I got my left-hand menu bar all spanked up and I got my iframe all nicely positioned in the main body of the page. Great. But now, I want each link on my menu bar to open a new iframe in the same main body of the page that the first one is occupying. How do I do this?

Tazman

ShawnR

8:29 am on May 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Tazman, and welcome to WebmasterWorld!

So you want your links to open up their target docments in your iframe?

You name your iframe as follows:

<iframe src="the page to display when your page first loads up.htm" name="some_name_i_like" .... >Your browser doesn't support iframes, but you can still use this site just fine. Click <a href="the page to display when your page first loads up.htm" target="some_name_i_like">here</a></iframe>

Then in each of your links in the menu bar, do as follows:

<a href="..." target="some_name_i_like" ...>

Shawn

PS You say "I decided to break out of tables and use ifames". There is a movement away from using tables for layout. But there is also a movement away from using frames, and iframes have all the disadvantages of frames plus a few more. So you may wish to consider alternatives... No point moving away from one 'out of favour' construct only to embrace another 'out of favour' construct. Personally, I'm not a zealot, and I think tables, frames, iframes all have their place. But if you are starting out fresh on a new site, it may be worth looking into the alternatives.

FlagMan

4:33 pm on May 31, 2003 (gmt 0)

10+ Year Member



Yes, Iframes have many of their own problems...Cacheing problems, can'st link directly tospecific pages on the site, and you have to make sure all of your links have the propper targets, or you will end up with some messed up frames.

davis

5:40 pm on May 31, 2003 (gmt 0)

10+ Year Member



Just another tip.
If you want almost all the links in iFrame A to open in iFrame B, you can set this in the body of your iframeA page

<base target="iframeB">

This will open all the links into the other iframe... but if you want a few of the links to go somewhere else, you can put the target="blah" in the a href tag

-Davis :)

tazman

6:58 pm on May 31, 2003 (gmt 0)

10+ Year Member



Thanks davis- that was another thing I was looking to do. Also, when i say "breaking out of tables" i mean thath i stil use them for layouts, but for content im beggining to like iframes more. So far no disadvantage have come about, but form what i understand with you help there are some. Thanks for your help your help. it works now. :)

Tazman

tedster

7:22 pm on May 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Something to be aware of - some people are reporting problems getting their iframed content indexed by the search engines. If the SEs matter for your site, let us know how it works for you.

tazman

8:43 pm on May 31, 2003 (gmt 0)

10+ Year Member



What are SE's?

tazman

Hucasys

2:42 pm on Jun 2, 2003 (gmt 0)

10+ Year Member



SE = search engine

there is a post on that subject: iframes ans SE, around here somewhere.....

Ah! found it....

[webmasterworld.com...]