Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    date uno sguardo a questo piccolo script?

    io l'ho scaricato, e mi serve per mandare i banner a rotazione, in teoria dovrebbe essere "neutrale" ma invece ci sono alcuni di questi banner, in particolare l'ultimo che appare molto di rado...
    sapete dirmi perchè? grazie.


    <!---
    function choices()
    {
    this[0] = 4;
    this[1] = "<a target=\"_blank\" href=\"http://www.lamedusahotel.com\"><img src=\"medusa.gif\" width=150 height=60 border=0 alt=\"\"></a>";
    this[2] = "<a target=\"_blank\" href=\"http://www.santangelofaito.com\"><img src=\"santangelo2.gif\" width=150 height=60 border=0 alt=\"\"></a>";
    this[3] = "<a target=\"_blank\" href=\"http://www.residencenerano.com\"><img src=\"residence2.gif\" width=150 height=60 border=0 alt=\"\"></a>";
    this[4] = "<a target=\"_blank\" href=\"http://www.galassovetri.com\"><img src=\"galasso.gif\" width=150 height=60 border=0 alt=\"\"></a>";
    }






    function popUpBanner(list)
    {
    var today = new Date();
    var choiceInstance = new choices();
    var Banner = choiceInstance[(today.getSeconds() % choiceInstance[0]) + 1];
    }
    function grabBanner()
    {
    var today = new Date();
    var choiceInstance = new choices();
    var Banner = choiceInstance[(today.getSeconds() % choiceInstance[0]) + 1];
    return Banner;
    }
    document.writeln(grabBanner());
    // FINE --->

  2. #2
    scusate ma ora invece su 20 refresh, mi è uscito 10-12 volte sempre il terzo... ma come è sto fatto? è normale che possa capitare?

  3. #3
    Avevo scritto una castroneria...Scusate...
    Adesso guardo...

    Comunque usa un Math.random()...

    CiAo

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.