PDA

View Full Version : Frame or Iframe?


Grant Palin
10-09-2002, 11:44 PM
On a website, would it be better to use frames to seperate navigation and content, or would an iframe be better?

I know that regular frames are not so good in that you can't bookmark or print properly from a site in frames. The way I see it, you could use part of a regular page for the navigation and then insert an iframe with the actual site content. And bookmarking the actual, enclosing page would be simple.

How am I doing? Are there any other pros and cons between the two I should know about? I'm kind of leaning towards an iframe, since it seems to be easier to implement and use.

Thanks.

Revelle
10-10-2002, 01:15 PM
I know NS 4 doesn't support IFrames... and not everyone has updated to the lastest version 7 - even tho they should... but anyhow.

If you used a Frameset, you can always use an "Add to Favourites" JS code on your pages... got that for you if you like:

-------------to insert anywhere within the body-----------
-------------anything in RED you can change :)-----------

<!-- add to fav, JS code -->

<SCRIPT LANGUAGE="JavaScript">
var lookup=navigator.appVersion
aol = (lookup.indexOf("AOL") > 0 );
if (aol) // Only true for AOL
{
document.write("Add to favourites!");
}
else
{
ie4 = ((navigator.appName == "Microsoft Internet Explorer") &&
(parseInt(navigator.appVersion) >= 4 ));
if (ie4) // Only true for MSIE
{
var url="DESIRED URL";
var title="TITLE OF PAGE";
document.write('<A HREF="javascript:window.ext');
document.write('ernal.AddFavorite(url,title);" ');
document.write('onMouseOver=" window.status=');
document.write("'Add to favourites! '; return true ");
document.write('"onMouseOut=" window.status=');
document.write("' '; return true ");
document.write('"><font size="-3">Add to favourites!</font></a>');
}
}
ns4 = (navigator.appName == "Netscape");
if (ns4) // Only true for Netscape
{
document.write("Press CTRL+D to Add to favourites!");
}
</SCRIPT>

<!-- end -->
----------------

I like IFrames over Frames but again the browser type/version comes into play ((heh, but then some browser types/versions have problems with Frames)).

Try using a pop-up window (target-top)... for the navigation? Saw that done once. However, some people might think it's a pop-up ad :D

..so.. You could provide a link on the page saying "click for navigation" or the like, you get the idea.

Good Luck and have fun ^.^;
*Ahem ... still like the IFrame idea. Why not try some JS (JaveScript) for some drop-downs or simular ideas, for NAV?
--but-- you can Never go wrong with simple Nav on the same page as the content. Using a table that is divided up, half or the like with your content, and the other part your Nav. Or, perhaps putting your Content in an IFrame? Just springing some ideas ;)

Grant Palin
10-11-2002, 02:06 AM
That frame boomarker, thanks for that. Does it reload bookmarked framed pages WITH the frames intact as well? Or does it just load the actual content page?

I seem to remember seeing somewhere that layers could be used also to allow for Navigator's not support IFRAMES. I don't know if that's true or not...anybody? If it was true, that should expand the compatibility a bit, shouldn't it?

To be honest, I don't like the idea of having all site links in a pop-up window. Like you said, people might think it was a popup ad or such, and might close it.

I've considered using javascript drop-down menus for navigation, but I don't really want to change my site's navigation system. I have a site enclosed in frames currently, and I've been reading about the frame issues and thinking about converting to an IFRAME for displaying site content. Using other navigation methods, in my opinion, would really change the look of my site, which I think is just fine. Here's the link to my site:
http://www.freewebs.com/hommworld/Homm/index.html
Take a look and let me know what you think about converting. I welcome opinions.

Quiet Storm
10-11-2002, 03:31 AM
Nearly impossible to do with FRAMES:

The Storms (http://www.angelfire.com/mo2/cbch21/)
(IE5+ only)

:D

Grant Palin
10-11-2002, 04:16 AM
Originally posted by Quiet Storm
Nearly impossible to do with FRAMES:

The Storms (http://www.angelfire.com/mo2/cbch21/)
(IE5+ only)

:D

I'm sorry, I don't understand...

Quiet Storm
10-11-2002, 04:40 PM
As example; I think one can do more with iFRAMEs than with FRAMEs

Revelle
10-11-2002, 06:14 PM
Just hope that anyone visiting your site using NS has an updated version. NS4 doesn't support them -- IFrames that is.
^.^

dlconnor
10-12-2002, 04:31 PM
I visited Storms site and to me it looks like the best argument I have ever seen to use IE5+!!

Good work - Lots of fun!

starglow
10-13-2002, 04:01 AM
Originally posted by Revelle
Just hope that anyone visiting your site using NS has an updated version. NS4 doesn't support them -- IFrames that is.
^.^

well then you just put a note saying if you can't see the nav links to update your browser cos it's old old old. really, in this day and age where technology, especially on the pcs and net, are constantly moving forward, how can anyone still browse the web without an up to date browser? it doesn't take the long to just download the new one and install it and it saves the person the trouble of constantly having troubles on new websites with an old browser.

my website at www.justanotherdaynow.com uses iframes in the exact way asked about and it works wonders. I use notepad so I dont have dreamweaver templetes to work with so iframes are really the best way to quickly update something thats on tons of pages on your website. if I didn't use iframes I'd have to take hours adding just one new link in the nav. I'm sorry but I'm not gonna spend hours doing that anymore when I can just use iframes instead simply cos some people can't be bothered updating an old browser.

chesneil
10-30-2002, 02:44 AM
starglow

As well as people who don't have their finger on the pulse of cutting-edge browser technology, presumably Mac users don't come high on your list of priorities either. I'm using the most up-to-date IE browser possible on my (3-and-a-half year old) Mac and I couldn't access Quiet Storm's site either. To update my browser I'd have to update my OS, which in practice means buying a more powerful computer. Not ideal, but that's how it is.

Unlike Ferrari, which can afford to be picky about it's clientele, we usually make our sites for the 'masses'; by being too strict about who you're going to make an effort for, don't you think you're shooting yourself in the foot? This must be the only industry where there's some kind of imagined responsibility on the part of the customer to accommodate the seller! I could have been a possible customer of Quiet Storm's business, if it is a business - I've got no way of knowing.

No offence intended. I was really prompted to write to add my twopenny's worth for the Mac community. :thumbsup: ;)

Grant Palin
10-30-2002, 03:54 AM
What if you were to provide a sitemap with all the links, as an alternative for users who can't view IFRAMES? Could you just go ahead with the sitemap, and provide a link to that in case the IFRAME doesn't work?

undyingfires
10-30-2002, 01:16 PM
Could you also ( or ) use a redirect javascript for browser (type and version) detection. Olders get redirected here, others there?

Grant Palin
10-30-2002, 09:19 PM
It can be done...I've seen it before. But I don't know how to do it myself. I don't know much javascript. Myself, I would just displat a warning and a link to another version of the site, or to the site map.