ConfusedOfLife
07-25-2002, 12:04 PM
Hi, It seems that it's something wrong with the mimeTypes, when I write:
alert(navigator.mimeTypes.length)
it gives me zero! I have almost everything in my browser, I can see the flash files, movies, sounds and almost everything! why doesn't it work?
something else, let's say that I wana see if my clients have the flash player installed on their browsers, and based on that I show some stuff, the following should work:
<script>
// Can we display Shockwave movies?
mimetype = navigator.mimeTypes["application/x-director"]
if (mimetype) {
// Yes, so can we display with a plug-in?
plugin = mimetype.enabledPlugin
if (plugin)
// Yes, so show the data in-line
document.writeln("Here\'s a movie: <EMBED SRC=mymovie.dir HEIGHT=100 WIDTH=100>")
else
// No, so provide a link to the data
document.writeln("<A HREF='mymovie.dir'>Click here</A> to see a movie.")
} else {
// No, so tell them so
document.writeln("Sorry, can't show you this cool movie.")
}
</script>
but as I said, it shows my mimeTypes.length as zero! is it normal? I tried that on another comp too, but it's the same!
alert(navigator.mimeTypes.length)
it gives me zero! I have almost everything in my browser, I can see the flash files, movies, sounds and almost everything! why doesn't it work?
something else, let's say that I wana see if my clients have the flash player installed on their browsers, and based on that I show some stuff, the following should work:
<script>
// Can we display Shockwave movies?
mimetype = navigator.mimeTypes["application/x-director"]
if (mimetype) {
// Yes, so can we display with a plug-in?
plugin = mimetype.enabledPlugin
if (plugin)
// Yes, so show the data in-line
document.writeln("Here\'s a movie: <EMBED SRC=mymovie.dir HEIGHT=100 WIDTH=100>")
else
// No, so provide a link to the data
document.writeln("<A HREF='mymovie.dir'>Click here</A> to see a movie.")
} else {
// No, so tell them so
document.writeln("Sorry, can't show you this cool movie.")
}
</script>
but as I said, it shows my mimeTypes.length as zero! is it normal? I tried that on another comp too, but it's the same!