login  Naam:   Wachtwoord: 
Registreer je!
 Forum

Pagina doorsturen indien geen flash geinstalleerd. (Opgelost)

Offline Appie_Dijk - 14/02/2009 18:58
Avatar van Appie_DijkLid Hallo iedereen,

Ik heb een website in flash, nu zijn er (helaas) nog steeds mensen die geen flash hebben.
Nu wil ik graag dat als mensen geen flash geinstalleerd hebben dat ze automatisch doorgestuurd worden naar http://www.mijndomein.nl/html

hoe moet ik dit doen?

Groeten Albert

2 antwoorden

Gesponsorde links
Offline Martijn - 14/02/2009 19:08 (laatste wijziging 14/02/2009 19:08)
Avatar van Martijn Crew PHP
http://www.codingforums.com/archive/index.php/t-106730.html schreef:
<?
// Search through the HTTP_ACCEPT header for the Flash Player MIME type.
if (strstr($_SERVER['HTTP_ACCEPT'], 'application/x-shockwave-flash'))
{
$hasFlash = true;
}

if ($hasFlash)
{
require('flash.html');
} else {
require('noflash/index.html');
};

?>

But it does not work for Safari Mac
Offline Appie_Dijk - 15/02/2009 00:31
Avatar van Appie_Dijk Lid @DeviourSoul: Werkt helaas niet... heb nog een hele tijd gezocht en dit is de oplossing:

  1. <SCRIPT LANGUAGE=JavaScript1.1>
  2. <!--
  3. var MM_contentVersion = 6;
  4. var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
  5. if ( plugin ) {
  6. var words = navigator.plugins["Shockwave Flash"].description.split(" ");
  7. for (var i = 0; i < words.length; ++i)
  8. {
  9. if (isNaN(parseInt(words[i])))
  10. continue;
  11. var MM_PluginVersion = words[i];
  12. }
  13. var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
  14. }
  15. else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
  16. && (navigator.appVersion.indexOf("Win") != -1)) {
  17. document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
  18. document.write('on error resume next \n');
  19. document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
  20. document.write('</SCR' + 'IPT\> \n');
  21. }
  22. if ( MM_FlashCanPlay ) {
  23. window.location.replace("http://www.mijndomein.nl/flash.htm");
  24. } else{
  25. window.location.replace("http://www.mijndomein.com/geenflash.htm");
  26. }
  27. //-->
  28.  
  29. </SCRIPT>


Heb deze code gevonden op: www.kirupa.com

Bedankt voor de moeite!
Gesponsorde links
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.176s