Welcome to WebmasterWorld Guest from 54.145.39.186

Forum Moderators: incrediBILL

Message Too Old, No Replies

IFRAME Alternative

other than the object tag or php include

     

cookiemonster

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

5+ Year Member



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

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

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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

5+ Year Member



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

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

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I'm not recommending this but...

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

Kaled.

rocknbil

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

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month