Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it L'avatar di alteax
    Registrato dal
    Feb 2002
    Messaggi
    114

    script detection per caricare flash o gif

    Ciao a tutti mi sapete dire dove posso trovare o direttamente postare qui uno script che mi permetta di caricare un banner flash se viene riconosciuto il plugin oppure una gif se l'utente non ha il plugin?
    grazie mille in anticipo!

  2. #2

  3. #3
    Prova così:
    codice:
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript">
    <!--
    function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0
      var ok=false; document.MM_returnValue = false;
      with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
        ok=(plugins && plugins[plgIn]);
      } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
        if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash;
        else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
        else ok=autoGo; }
      if (!ok) theURL=altURL; if (theURL) window.location=theURL;
    }
    //-->
    </script>
    </head>
    
    <body bgcolor="#FFFFFF" text="#000000" onLoad="MM_checkPlugin('Shockwave Flash','banner.swf','immagine.gif',false);return document.MM_returnValue">
    </body>
    <script name="Used by MM_checkPlugin" language="javascript">
    <!--
    with (navigator) if (appName.indexOf('Microsoft')!=-1 && appVersion.indexOf('Mac')==-1) document.write(''+
    '<scr'+'ipt language="VBScript">\nOn error resume next\n'+
    'MM_dir = IsObject(CreateObject("SWCtl.SWCtl.1"))\n'+
    'MM_flash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash"))\n</scr'+'ipt>');
    //-->
    </script>
    </html>
    Le voci da sostituire con i tuoi file, sono in grassetto.

    Oppure segui le guide che ti ha consigliato Yassassin!
    :gren:

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.