Visualizzazione dei risultati da 1 a 10 su 10

Discussione: immagini random

  1. #1
    Utente di HTML.it
    Registrato dal
    May 2005
    Messaggi
    142

    immagini random

    ciao a tutti, vorrei inserire in una pagina asp al centro una immagine che ogni 10 secondi mi cambia(tutti le immagini che mi girano sono dentro ad una cartella).
    cosa mi consigliate di fare?

  2. #2

  3. #3
    Utente di HTML.it
    Registrato dal
    May 2005
    Messaggi
    142

    non mi funziona

    ciao, purtroppo non mi funziona, non mi carca le immagini.
    mi controlli dov'è l'orrore sul codice?
    il codice mio è questo:

    <%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
    <html>
    <head>
    <title>Documento senza titolo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
    <script>
    // (C) 2000 www.CodeLifter.com
    // http://www.codelifter.com
    // Free for all users, but leave in this header
    // NS4-6,IE4-6
    // Fade effect only in IE; degrades gracefully

    // =======================================
    // set the following variables
    // =======================================

    // Set slideShowSpeed (milliseconds)
    var slideShowSpeed = 5000

    // Duration of crossfade (seconds)
    var crossFadeDuration = 3

    // Specify the image files
    var Pic = new Array() // don't touch this
    // to add more images, just continue
    // the pattern, adding to the array below

    Pic[0] = '/immagini/Pesce1.jpg'
    Pic[1] = '/immagini/Pesce2.jpg'
    Pic[2] = '/immagini/Pesce3.jpg'
    Pic[3] = '/immagini/Pesce4.jpg'
    Pic[4] = '/immagini/Pesce5.jpg'

    // =======================================
    // do not edit anything below this line
    // =======================================

    var t
    var j = 0
    var p = Pic.length

    var preLoad = new Array()
    for (i = 0; i < p; i++){
    preLoad[i] = new Image()
    preLoad[i].src = Pic[i]
    }

    function runSlideShow(){
    if (document.all){
    document.images.SlideShow.style.filter="blendTrans (duration=2)"
    document.images.SlideShow.style.filter="blendTrans (duration=crossFadeDuration)"
    document.images.SlideShow.filters.blendTrans.Apply ()
    }
    document.images.SlideShow.src = preLoad[j].src
    if (document.all){
    document.images.SlideShow.filters.blendTrans.Play( )
    }
    j = j + 1
    if (j > (p-1)) j=0
    t = setTimeout('runSlideShow()', slideShowSpeed)
    }
    </script>
    <body onload="runSlideShow()">

    <table border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td id="VU" height=150 width=150>
    [img]/immagini/Pesce1.jpg[/img]</td>
    </tr>
    </table>



    </p>
    </body>
    </html>

  4. #4
    Utente di HTML.it
    Registrato dal
    May 2005
    Messaggi
    142

    non mi funziona

    ciao, purtroppo non mi funziona, non mi carca le immagini.
    mi controlli dov'è l'orrore sul codice?
    il codice mio è questo:

    <%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
    <html>
    <head>
    <title>Documento senza titolo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
    <script>
    // (C) 2000 www.CodeLifter.com
    // http://www.codelifter.com
    // Free for all users, but leave in this header
    // NS4-6,IE4-6
    // Fade effect only in IE; degrades gracefully

    // =======================================
    // set the following variables
    // =======================================

    // Set slideShowSpeed (milliseconds)
    var slideShowSpeed = 5000

    // Duration of crossfade (seconds)
    var crossFadeDuration = 3

    // Specify the image files
    var Pic = new Array() // don't touch this
    // to add more images, just continue
    // the pattern, adding to the array below

    Pic[0] = '/immagini/Pesce1.jpg'
    Pic[1] = '/immagini/Pesce2.jpg'
    Pic[2] = '/immagini/Pesce3.jpg'
    Pic[3] = '/immagini/Pesce4.jpg'
    Pic[4] = '/immagini/Pesce5.jpg'

    // =======================================
    // do not edit anything below this line
    // =======================================

    var t
    var j = 0
    var p = Pic.length

    var preLoad = new Array()
    for (i = 0; i < p; i++){
    preLoad[i] = new Image()
    preLoad[i].src = Pic[i]
    }

    function runSlideShow(){
    if (document.all){
    document.images.SlideShow.style.filter="blendTrans (duration=2)"
    document.images.SlideShow.style.filter="blendTrans (duration=crossFadeDuration)"
    document.images.SlideShow.filters.blendTrans.Apply ()
    }
    document.images.SlideShow.src = preLoad[j].src
    if (document.all){
    document.images.SlideShow.filters.blendTrans.Play( )
    }
    j = j + 1
    if (j > (p-1)) j=0
    t = setTimeout('runSlideShow()', slideShowSpeed)
    }
    </script>
    <body onload="runSlideShow()">

    <table border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td id="VU" height=150 width=150>
    [img]/immagini/Pesce1.jpg[/img]</td>
    </tr>
    </table>



    </p>
    </body>
    </html>

  5. #5
    Scusa ma a che serve la prima riga?

    <%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>


    comunqe prova a cancellare il primo tag <body>

    </head>

    <body>
    <script>


    perchè comunqe lo riapri dopo quando chiami la funzione js



  6. #6
    Quella è una dichiarazione ASP... dichiara che il codice contenuto nell'ASP della pagina è Javascript :P
    SGr33n

  7. #7
    Ok scusa ma non ho mai sviluppato in ASP comunqe adesso funziona? hai provato a cancellare il primo tag body?
    Da me funziona.

  8. #8
    Uhm però se mi accorgessi che è un altro utente che figure... sob stendiamo un velo pietoso

  9. #9
    ehehe don't warry capita anche a me con utenti che come me non hanno un avatar :P devo decidermi a metterlo
    SGr33n

  10. #10
    Detto fatto lol :P
    SGr33n

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.