Verifying Plug-in and MIME Type : Mime Type « HTML « JavaScript DHTML






Verifying Plug-in and MIME Type

<HTML>
<HEAD>
<TITLE>W3C DOM Event Propagation</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function mimeAndPluginReady(mime_type, plug_in) {
    if (mimeIsReady(mime_type)) {
        var plugInOfRecord = navigator.mimeTypes[mime_type].enabledPlugin
        plug_in = plug_in.toLowerCase()
        for (var i = 0; i < navigator.plugins.length; i++) {
            if (navigator.plugins[i].name.toLowerCase().indexOf(plug_in) != -1) {
                if (navigator.plugins[i] == plugInOfRecord) {
                    return true;
                }
            }
        }
    }
    return false;
}

</SCRIPT>
</HEAD>
<body>
</BODY>
</HTML>


           
       








Related examples in the same category

1.Using the mimeTypes Object
2.Verifying a MIME Type
3.Show Browser Mime type (Firefox)
4. Properties of the Mimetype Object