Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

object tag not working IE8 2

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I have been trying to implement valid markup with social media plugins using w3c's recommended object tag method.

It seems to work fine in IE9, Opera, FireFox & Chrome, but not IE8?

this is the code i'm using
Code:
<object data="[URL unfurl="true"]http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fdance-music.org%2F&amp;show_faces=false&amp;layout=button_count"[/URL] style="border:none; width:100px; height:35px"></object>

Why is it not working in IE8?

Cheers,
1DMF.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Just tested and it doesn't work in IE7 either.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Everything I can find points to the fact that IE does not support the object tag in the same way other browsers do.

However, adding a type attribute to the object tag seems to have gotten it to work:
Code:
<object data="[URL unfurl="true"]http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fdance-music.org%2F&amp;show_faces=false&amp;layout=button_count"[/URL] [red]type="text/html"[/red] style="border:none; width:100px; height:35px">
</object>

It does however throw a warning, and an error, but after that it works.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
It didn't seem to work for me and if you put IE8/7 in compatability mode you just get an empty 'iframe' looking box.

I've given up ad gone back to the non-valid <g> <fb> tags.

At least they are cross-browser compatible in all modes!

I thought <object> was an MS tag deprecating <embed> , so the fact it doesn't work is mind-boggling!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
The MSDN reference has this to say:

MSDN said:
Internet Explorer 9. In IE9 Standards mode, the object element is allowed to load content from other domains. In IE8 Standards mode, however, this is not allowed.

So, if you're trying to get it working in IE8 in standards mode, it looks like you're out of luck, assuming you aren't editing facebook.com :-D.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Snippets & Info:
The Out Atheism Campaign
 
Thanys for trying guys.

I was quite excited when W3 replied to my email with a potential valid way of doing things.. alas it was not to be :-(

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top