Domanda

What is the best practice for displaying an HTML alternative when a browser plug-in is not available? I'm embedding the plugin with an object tag like so:

<object id="plugin0" type="application/x-myplugin"></object>

This is what an unknown plugin displays as in Google Chrome, however I'd like the solution to work on all browsers (i.e. FF plugin/Chrome plugin/IE ActiveX object)

Image of "No plug-in available" error in Google Chrome

-foot

È stato utile?

Soluzione

If you're talking about flash, whatever you place within the object tag will show up if flash is not supported.

Here's an example of a flash movie with a fallback image:

<object type="application/x-shockwave-flash data="yourmovie.swf" width="400" height="300">
<param name="movie" value="yourmovie.swf" />
<img src="noflash.gif" width="200" height="100" alt="" />
</object>

I typically test for plugins using javascript and write to the page based on the test results.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top