12. maj 2005 - 11:29
Der er
5 kommentarer og 2 løsninger
Detect flash player
Jeg har funnet dette scriptet. <script language="Javascript"> <!-- if ( navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin && navigator.plugins && navigator.plugins["Shockwave Flash"] ){ document.location.href = "flash-siden.html" } else { document.location.href = "uden-flash.html" } //--> </SCRIPT> Men jeg vil gjøre det om så at hvis man har flash så skal scriptet ikke gjøre noe. Hvis man ikke har flash så skal man gåt til index.asp?Action=NoFlash
Annonceindlæg tema
Nu er jeg ikke den store Javascript haj men Den nemme vil være at if ( navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin && navigator.plugins && navigator.plugins["Shockwave Flash"] ){ } else { document.location.href = "index.asp?Action=NoFlash" } ikke den smarteste løsning men den skulle gerne virke :-)
Mere så du ved så virker scriptet ikke i IE6.0 i windows XP med SP2(ved ikke om det er fordi ActiveX-objekt er slået fra som standard i SP2) Det virker i FireFox og Opera. Hvis du vil have det til at virke i IE også så brug dette script. if(!navigator.mimeTypes && !navigator.plugins){ document.location.href = "index.asp?Action=NoFlash"; } ellers er her det gamle script skrevet lidt pænere (men virker ikke i IE i XP med SP" i hvert fald) if(!navigator.mimeTypes && !navigator.mimeTypes["application/x-shockwave-flash"] && !navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin && !navigator.plugins && !navigator.plugins["Shockwave Flash"]){ document.location.href = "index.asp?Action=NoFlash"; } håber det hjalp
Hei! Dette virker ikke, jeg vil ha et script som virker på alle maskiner MAC og Windows. Uansett om det man har XP og SP2. Har du noen forslag? <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript"> <!-- if(!navigator.mimeTypes && !navigator.plugins){ document.location.href = "index.asp?Action=NoFlash"; } //--> </script> </head> <body bgcolor="#FFFFFF" text="#000000"> <% If Request.QueryString("Action") = "" Then Response.Write("<font color=green>Du har Flash player installert!</font>") Else Response.Write("<font color=red>Du har ikke Flash player installert!</font>") End if %> </body> </html>
Dette virker på min XP SP2 men bare looper.. if ( navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin && navigator.plugins && navigator.plugins["Shockwave Flash"] ){ } else { document.location.href = "index.asp?Action=NoFlash" }
Post et svar så får du noen point.
Ja det var et ret godt script du fandt der det virkede både i IE og firefox og Opera på min PC.
Vi tilbyder markedets bedste kurser inden for webudvikling