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

    slideshow non funzionante in remoto

    Ragazzi ho questo tipo di problema.
    Uso i.e per visualizzare le pagine web.
    Ho creato (.. copiato) questo script per inserire uno slideshow nella mia pagina html.
    In locale funziona tutto alla grande.
    In remoto non si vedono le foto.
    Cosa succede????
    Premetto che ho controllato più volte che i files delle foto siano stati effettivamente trasferiti sul mio spazio web.
    Copio e incollo comunque lo script "incriminato"
    -------------------------

    <script type="text/javascript">
    theimage = new Array();


    // The dimensions of ALL the images should be the same or some of them may look stretched or reduced in Netscape 4.
    // Format: theimage[...]=[image URL, link URL, name/description]
    theimage[0]=["images/esterno2.jpg"/*tpa=http://www.*****.altervista.org/images/esterno2.jpg*/, "http://www.*****.altervista.org/images/", "Esterno"];
    theimage[1]=["images/ingresso.jpg"/*tpa=http://www..*****.altervista.org/images/ingresso.jpg*/, "http://www.*****.altervista.org/images/", "Ingresso"];
    theimage[2]=["images/sala1.jpg"/*tpa=http://www.*****.altervista.org/images/sala1.jpg*/, "http://www.*****.altervista.org/images/", "Sala"];
    theimage[3]=["images/sala2.jpg"/*tpa=http://www.*****.altervista.org/images/sala2.jpg*/, "http://www.*****.altervista.org/images/", "Sala"];
    theimage[4]=["images/cucina.jpg"/*tpa=http://www.*****.altervista.org/images/cucina.jpg*/, "http://www.*****.altervista.org/images/", "Cucina"];
    theimage[5]=["images/ripostiglio.jpg"/*tpa=http://www.*****.altervista.org/images/ripostiglio.jpg*/, "http://www.*****.altervista.org/images/", "Ripostiglio"];
    theimage[6]=["images/camera1.jpg"/*tpa=http://www.*****.altervista.org/images/camera1.jpg*/, "http://www.*****.altervista.org/images/", "Camera"];
    theimage[7]=["images/camera2.jpg"/*tpa=http://www.*****.altervista.org/images/camera2.jpg*/, "http://www.*****.altervista.org/images/", "Camera"];
    theimage[8]=["images/bagno1.jpg"/*tpa=http://www.*****.altervista.org/images/bagno1.jpg*/, "http://www.*****.altervista.org/images/", "Bagno"];
    theimage[9]=["images/bagno2.jpg"/*tpa=http://www.*****.altervista.org/images/bagno2.jpg*/, "http://www.*****.altervista.org/images/", "Bagno"];
    theimage[10]=["images/giardino.jpg"/*tpa=http://www.*****.altervista.org/images/giardino.jpg*/, "http://www.*****.altervista.org/images/", "Giardino"];
    theimage[11]=["images/Cortile%20retro.jpg"/*tpa=http://www.*****.altervista.org/images/Cortile%20retro.jpg*/, "http://www.*****.altervista.org/images/", "Cortile"];

    playspeed=4000;// The playspeed determines the delay for the "Play" button in ms
    dotrans=1; // if value = 1 then there are transitions played in IE
    transtype='revealtrans';// 'blendTrans' or 'revealtrans'
    transattributes='23';// duration=seconds,transition=#<24
    //#####
    //key that holds where in the array currently are
    i=0;


    //###########################################
    //if random
    function SetRandom() {
    tempimage = new Array();
    for(p=0; p<theimage.length; p++){
    for(p1=0; p1>-1; p1) {
    tempNum = Math.floor(Math.random()*theimage.length)
    if(!tempimage[tempNum]){
    tempimage[tempNum]=theimage[p];
    break;
    }
    }
    }
    for(p=0;p<theimage.length;p++)theimage[p]=tempimage[p];
    }

    //if random order
    SetRandom()


    //###########################################
    window.onload=function(){

    //preload images into browser
    preloadSlide();

    //"jump to" box
    for (y=0;y<theimage.length;y++) {
    document.slideshow.imgComboBox[y]=new Option(theimage[y][2]);
    }

    //set transitions
    GetTrans();

    //set the first slide
    SetSlide(0);

    //autoplay
    PlaySlide();
    }

    //###########################################
    function SetSlide(num) {
    //too big
    i=num%theimage.length;
    //too small
    if(i<0)i=theimage.length-1;

    //switch the image
    if(document.all&&!window.opera&&dotrans==1)eval('d ocument.images.imgslide.filters.'+transtype+'.Appl y()')
    document.images.imgslide.src=theimage[i][0];
    if(document.all&&!window.opera&&dotrans==1)eval('d ocument.images.imgslide.filters.'+transtype+'.Play ()')

    //if drop down box
    if(document.slideshow.imgComboBox){
    document.slideshow.imgComboBox.selectedIndex = i;
    }

    //if they want name of current slide
    document.getElementById('slidebox').innerHTML=thei mage[i][2];

    //if they want current slide number and total
    document.getElementById('slidecount').innerHTML= "Immagine "+(i+1)+" di "+theimage.length;

    }


    //###########################################
    function PlaySlide() {
    if (!window.playing) {
    PlayingSlide(i+1);
    if(document.slideshow.play){
    document.slideshow.play.value=" Stop ";
    }
    }
    else {
    playing=clearTimeout(playing);
    if(document.slideshow.play){
    document.slideshow.play.value=" Play ";
    }
    }
    // if you have to change the image for the "playing" slide
    if(document.images.imgPlay){
    setTimeout('document.images.imgPlay.src="'+imgStop +'"',1);
    imgStop=document.images.imgPlay.src
    }
    }


    //###########################################
    function PlayingSlide(num) {
    playing=setTimeout('PlayingSlide(i+1);SetSlide(i+1 );', playspeed);
    }


    //###########################################
    //desc: picks the transition to apply to the images
    function GetTrans() {
    //si=document.slideshow.trans.selectedIndex;

    if((document.slideshow.trans && document.slideshow.trans.selectedIndex == 0) || (!document.slideshow.trans && dotrans==0)){
    dotrans=0;
    }
    else if ((document.slideshow.trans && document.slideshow.trans.selectedIndex == 1) || (!document.slideshow.trans && transtype == 'blendTrans')){
    dotrans=1;
    transtype='blendTrans';
    document.imgslide.style.filter = "blendTrans(duration=1,transition=1)";
    }else{
    dotrans=1;
    transtype='revealtrans';
    if(document.slideshow.trans) transattributes=document.slideshow.trans[document.slideshow.trans.selectedIndex].value;
    document.imgslide.style.filter = "revealTrans(duration=1,transition=" +transattributes+ ")";
    }

    }
    //###########################################
    function preloadSlide() {
    for(k=0;k<theimage.length;k++) {
    theimage[k][0]=new Image().src=theimage[k][0];
    }
    }


    </script>

  2. #2
    :master: jscript.... forse è meglio se cambi sezione?

  3. #3
    ok, riproporrò la domanda in altra sezione se necessario.
    Ma non credo sia un problema di jscript, visto che in locale tutto funziona perfettamente.
    Ho solo chiesto come mai in locale funziona e in remoto no.
    Grazie a tutti.

  4. #4
    bhe, li ti sapranno dire meglio,
    sono in piu a capirne

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.