Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Flash Detection
- From: grillo at lazzuri.com.br (Marcelo Simon)
- Subject: [Javascript] Flash Detection
- Date: Thu Mar 27 16:36:39 2003
Hi all,
I'm having a headache over this script to detect if is flash is present or
not. If someone could see what my eyes are not seeing please help me . :)
<img name="testMime" src="test.swf">
<script language="JavaScript"><!--
var can_play = false;
var mimetype = 'application/x-shockwave-flash';
if (navigator.mimeTypes) {
if (navigator.mimeTypes[mimetype] != null) {
if (navigator.mimeTypes[mimetype].enabledPlugin != null) {
can_play = true;
}
}
}
if (!can_play && navigator.appVersion.indexOf('MSIE') !=-1) {
if (document.all &&
document.testMime.mimeType.toLowercase().indexOf('flash') !=-1) {
can_play = true;
}
}
if (can_play)
window.location = 'plug.html';
else
window.location = 'noplug.html';
//-->
</script>
TIA
Marcelo Simon
- Follow-Ups:
- [Javascript] Flash Detection
- From: David T. Lovering
- [Javascript] Flash Detection
- From: Jaime Iniesta
- [Javascript] Flash Detection
- References:
- [Javascript] select
- From: Michael Dougherty
- [Javascript] select
- From: Kelly Zhu
- [Javascript] select
- From: Andrew Gibson
- [Javascript] select
- Prev by Date: [Javascript] select
- Next by Date: [Javascript] select
- Previous by thread: [Javascript] select
- Next by thread: [Javascript] Flash Detection
- Index(es):