Deutsch English
Flash, Internet, Programming Diesen Artikel auf Deutsch lesen

Object not showing up in Firefox?

When converting my site to XHTML, the WordPress plugin “WP GuestMap” posed another little obstacle. It is the plugin that I use on the “Visitors” page to display the world map with the hometowns of all visitors.
Until now, I had implemented the map via IFrame. Although the plugin does offer a code snippet for XHTML-conform embedding as an object, it just didn’t work in Firefox: Instead of a map, it displayed – nothing. The code looked as follows:

<object classid="clsid:25336920-03F9-11CF-8FD0-00AA00686F13" type="text/html" data="http://www.domain.de/eine-html-seite.html"></object>

After I had finally struggled through an article on AListApart.com[1] that I had delayed reading for weeks already, I knew what the snag was: It was the attribute classid that caused the trouble!

(…) the GUID used in the classid attribute was specific to the browser’s ActiveX configuration. In fact, it was causing Netscape 7 and Mozilla to totally ignore the object.

To say it clearly: classid is only for Internet Explorer, to let it know which player/program it should use to play back/display the object. There is, however, another attribute for the very same purpose which is understood by all browsers, namely the type attribute. As you can see, the code generated by “WP GuestMap” already contains a type declaration. So what’s the point of the totally superfluous classid? Hence with it!

<object type="text/html" data="http://www.domain.com/a-html-page.html"></object>

And now it works in Firefox, too! This little knack is not only helpful with HTML objects like this one, but with all the others as well. Only the type statement must be changed. For a Flash object for example, it would have to be type="application/x-shockwave-flash".



Comments

  1. 11th January 2010
    6:41 pm

    Will flag

    Great post!!! You just helped me solve the problem I was having with Firefox, and none of the dozens of other pages that came up first in Google even *mentioned* “classid” as being any kind of a problem. Thanks!

  2. 20th March 2009
    6:11 pm

    Ginchen flag

    Also, bei mir wird da im Firefox alles angezeigt – vorausgesetzt, ich deaktiviere Adblock und erlaube JavaScripts von wepmasterplan.com und intensifier.de.
    Aber wer will schon Werbung sehen. :P

  3. 20th March 2009
    6:59 am

    Andy flag

    und wie sieht es bei javascripten aus, im IE werden die scripte angezeigt, und im Firefox nicht. Habe ebayAD laufen, rechts im oben im Sidebar. Ich persönlich sehe den nur im IE, leider im Firefox nicht.

Write comment

Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <p> <pre lang="" line="" escaped=""> <q cite=""> <strike> <strong> <img src="" alt="" class="" width="" height=""> | Code snippets can be posted in `backticks`. Example: `<?php echo "Hi!"; ?>`