Welcome to WebmasterWorld Guest from 54.162.240.235

Forum Moderators: incrediBILL

Message Too Old, No Replies

Use OBJECT to add a Facebook Like Box?

Doesn't work in IE {sigh}

     
8:06 am on Feb 2, 2011 (gmt 0)

10+ Year Member



A friend wants to add a Facebook "Like Box" to her blog on an external site, so I have no control over the META tags or their other restrictions, which include no usage of IFRAME or JavaScript.

The code that comes directly from Facebook is as follows:

<iframe
src="http://www.facebook.com/plugins/likebox.php?etc..."
scrolling="no"
frameborder="0"
style="border:none; overflow:hidden; width:292px; height:62px;"
allowTransparency="true">
</iframe>


My idea was to replace IFRAME with OBJECT as follows:

<object 
data="http://www.facebook.com/plugins/likebox.php?etc..."
style="border:none; height:62px; overflow:hidden; width:292px;">
</object>


Voila!
Firefox shows the box.
Chrome brings it home.
Explorer starts the horror....

For whatever reason, it's just blank in IE, where the box should be. I'm still stuck after a week of trying every conceivable tweak. I added a link to her profile with "fallback" code, but I was really hoping to avoid that road. Ideas? Anyone? Bueller? Anyone?
9:39 am on Feb 2, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi there donfox,

have you tried adding type="text/html" as an attribute to the object tag?

birdbrain
5:07 am on Feb 3, 2011 (gmt 0)

10+ Year Member



Thanks, birdbrain; I did try that, but with the same results: Fine in FF and Chrome, blank in IE. I even tried type="application/x-shockwave-flash"

No, I'm not proud of that, but if it had worked, who's to know? It's not one of my sites, so I don't care how ugly or invalid the code is. XD
9:25 am on Feb 4, 2011 (gmt 0)



HTML dtd will not accept this kind of code <embed.....
How to check your html to xhtml -> validator.w3.org
You may use
<object data="fullpath of your media file">


instead of
<embed ....

[edited by: tedster at 4:26 pm (utc) on Feb 4, 2011]
[edit reason] removed signature link [/edit]

7:36 am on Feb 6, 2011 (gmt 0)

10+ Year Member



Mabuhay @ salamat jalicia,

The code doesn't need to be valid; she just wants to post a Facebook Like Box on her profile on a blog site. Neither of us owns the blog site, so it is the site owner's problem to worry about validation. ;)

We hoped the Like Box would work with at least the Big Three browsers, but without using IFRAME or JavaScript, because the site doesn't permit those. OBJECT seems to work fine in Firefox and Chrome but not Internet Explorer. We haven't checked Opera, Safari or others. :D

We would even be perfectly happy to use EMBED, which I did try but I couldn't figure out how to make it work with the Like Box either.

Sayang....
 

Featured Threads

Hot Threads This Week

Hot Threads This Month