homepage Welcome to WebmasterWorld Guest from 54.225.57.156
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
IFRAME Alternative
other than the object tag or php include
cookiemonster




msg:4097205
 1:52 am on Mar 14, 2010 (gmt 0)

Hi,

I know this topic has been discussed several times in the past, but I am seriously stuck here. So, are there ANY solid alternatives to the <iframe> tag (other than <object> or PHP include)? I have tried <object>, but over half of my sites visitors use IE, and we all know what IE does to the object tag. I can't use PHP include because my host won't support it.

Any ideas here? Javascript, perhaps?

Cheers!

 

tedster




msg:4097224
 3:00 am on Mar 14, 2010 (gmt 0)

Let's explore your needs a bit further. What kind of functionality do you need to support?

In other words, are you embedding content from your own site in several different pages? Or are you embedding content from a different domain? Do you need to have links that will change the embedded content to something else, or will a "once and done" display server your purpose?

And finally, what is the reason you don't want to use an iframe?

cookiemonster




msg:4097229
 3:28 am on Mar 14, 2010 (gmt 0)

tedster,

I only need to embed a navigation menu onto all of the pages on my site.
It has simple dropdown functionality using javascript (it uses quite a bit of markup, and I don't want to change the code on every page whenever I update the menu).
I don't want to use an iframe for two simple reasons: it isn't completely valid, and is quite glitchy and inefficient if you ask me.

Hope that helps.

tedster




msg:4097255
 4:50 am on Mar 14, 2010 (gmt 0)

Yes, you are much better off not using an iframe for navigation. It's better to have those links appear in the source code for each URL. And javascript for a site's main navigation can really mess with search engines, too.

Your host won't support a PHP include (seems odd to me)? How about a vanilla server-side include, as in shtml?

kaled




msg:4097373
 1:36 pm on Mar 14, 2010 (gmt 0)

I'm not recommending this but...

Use an invisible <iframe>, then use javascript/innerHTML to copy the contents to a <div>.

Kaled.

rocknbil




msg:4097555
 8:10 pm on Mar 14, 2010 (gmt 0)

Two more options,

Server Side Includes as tedster mentioned, but if your host doesn't support PHP, it may not support SSI.

A Javascript menu is a bad idea IMO (JS disabled, no navigation, which is what search engines are, non - JS "clients") but since you're already using JS, you can do an ajax query to write the menu to a div or other element.

kaled




msg:4097678
 12:35 am on Mar 15, 2010 (gmt 0)

If you are using an editor that supports templates (such as DreamWeaver) then placing the navigation in the template may solve the problem. This is fine up to a point, but if the website has thousands of pages then uploading all of them for each navigation change may be a big nuisance.

Kaled.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved