Sostituire il comando body onload

cavaliere123

Utente Attivo
31 Lug 2012
416
0
16
Salve e rieccomi, ho usato questo script e abbellito e chiaramente in una pagina web funziona benissimo e ve lo posto, chiaramente è un visualizzatore di immagini :

HTML:
<HTML>
<HEAD>


<style type="text/css">
<!--  
//<![CDATA[
.Caption {
font-family: vivaldi;
font-weight: bold;
font-size:  22pt;
color:black;
 }

A.Controls:link    { color:#666666;
                     text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:visited { color:#666666; text-decoration:none; 
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:active  { color:#666666; text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:hover   { color:#00FF00; text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
-->
</style>
<script type="text/javascript">
<!-- 
// (C) 2003 by CodeLifter.com
// Free for all users, but leave in this header.

// ==============================
// Set the following variables...
// ==============================



// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;

var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this
var showHot = false;       // don't change this

// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines
// starting at the end of the Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!

Picture[1]  = 'http://1.bp.blogspot.com/-CXpSTjfe6QA/UDKcxLPAmOI/AAAAAAAABjE/P4gkr01LPjw/s1600/Maschio+Angioino.jpg';
Picture[2]  = 'http://2.bp.blogspot.com/-6j6mbZ7HviA/UDKcxLzN9EI/AAAAAAAABjA/4XnWT7tfQQg/s1600/CastelDelMonte.jpg';
Picture[3]  = 'http://2.bp.blogspot.com/-7QfusEt0Rec/UDKcxF7kzHI/AAAAAAAABjI/fZ4pm8YPr74/s1600/CastelSantAngelo.jpg';


// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!

Caption[1]  = "Foto1: inizio";
Caption[2]  = "Castello antico del Medioevo, resistito sino ai giorni nostri per volonta' di mecenati del luogo";
Caption[3]  = "Foto3";

// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
var iss;
var jss = 0;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}

function control(how){
if (showHot){
if (how=="H") jss = 1;
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (jss > (pss)) jss=1;
if (jss < 1) jss = pss;
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
}}
//]]>
 -->
</script>

</HEAD>

<BODY>

<body onload='showHot=true;self.focus();'>

<div align="center"><table border=1 cellpadding=10 cellspacing=0 width=350px>
  <tr>

    <td width=350 height=300 colspan="3" style="background-color:red;">
    <img src=http://1.bp.blogspot.com/-at2tjuIsg-M/UDKl6L5I1NI/AAAAAAAABkU/eu6zQm0wVZE/s1600/SECONDA1.gif; name=PictureBox width=350 height=300 alt="">
    </td>
  </tr>
  <tr>

    <td id=CaptionBox class=Caption align=center colspan="3" style="background-color:#FF6600";">
  Premi i pulsanti &lt; &gt;
    </td>
  </tr>

  <tr>
    <td align="center" style="background-color:#33CCCC">
    <a class=Controls href="#" onClick="javascript:control('B');" title="indietro">&lt; &lt;</a>
    </td>
    <td align="center" style="background-color:#FFFF66">
    <a class=Controls href="#" onClick="javascript:control('H');" title="inizio">| | |</a>
    </td>
    <td align="center" style="background-color:#33CCCC">
    <a class=Controls href="#" onClick="javascript:control('F');" title="avanti">&gt; &gt;</a>
    </td>
  </tr>  
</table></div>

</BODY>
</HTML>

Adesso volevo inserirlo nel mio blog in un gadget html/javascript .
Quando si inserisce tutto il codice chiaramente i comandi body non li esegue e quindi mi ritrovo la seguente stringa :

HTML:
<body onload='showHot=true;self.focus();'>
da dover sostituire con un comando javascript che verrà interpretato, potete aiutarmi ?? Grazie.
 
Tempo fa ho avuto il tuo stesso problema.

Prova ad inserire nello script window.onload(comandi...);

Non ricordo se è window oppire document
Dovrebbe funzionare uno dei due
 
Salve e grazie per avermi risposto, ho provato cosi :

HTML:
if(  showHot==true) {  
 window.onload=control(how)}
ma non va...
non sono cosi esperto.... ti spiace dare una occhiata, altrimenti grazie lo stesso :))
 
ciao
ecco la sintassi corretta:


Codice:
document.onload=setInterval("countdown_ampliamento();","1000");

Qua io ad esempio dovevo far partire un countdown
 
Grazie per prima cosa e ho sostituito cosi :

document.onload='showHot=true;self.focus();'

ma chiaramente non va... figuriamoci :(
 
provato anche cosi :

HTML:
document.onload=control(how);
self.focus();


e anche :

HTML:
if (showHot==true) {
document.onload=control(how);
self.focus();   }

e neanche ....
 
Ciao,

qui:

Codice:
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
}}
//]]>
document.onload=showHot=true;self.focus();
-->

togli //<![CDATA[ dal CSS non sono acettati commenti con //


mettilo nel js

Codice:
// ==============================
// Set the following variables...
// ==============================

//<![CDATA[

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;


Valeria.
 
Grazie Valeria del suggerimento che ho subito eseguito :

HTML:
// ==============================
// Set the following variables...
// ==============================

//<![CDATA[

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;

spero di aver compreso bene, perdonami hai letto la mia richiesta, nonostante l'aiuto cortese di Malware, non ci sono riuscito... se puoi... cmq grazie ancora :)
 
Codice:
<HTML>
<HEAD>


<style type="text/css">
<!--  

.Caption {
font-family: vivaldi;
font-weight: bold;
font-size:  22pt;
color:black;
 }

A.Controls:link    { color:#666666;
                     text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:visited { color:#666666; text-decoration:none; 
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:active  { color:#666666; text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:hover   { color:#00FF00; text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
-->
</style>
<script type="text/javascript">
<!-- 
// (C) 2003 by CodeLifter.com
// Free for all users, but leave in this header.

// ==============================
// Set the following variables...
// ==============================

//<![CDATA[

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;

var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this
var showHot = false;       // don't change this

// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines
// starting at the end of the Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!

Picture[1]  = 'http://1.bp.blogspot.com/-CXpSTjfe6QA/UDKcxLPAmOI/AAAAAAAABjE/P4gkr01LPjw/s1600/Maschio+Angioino.jpg';
Picture[2]  = 'http://2.bp.blogspot.com/-6j6mbZ7HviA/UDKcxLzN9EI/AAAAAAAABjA/4XnWT7tfQQg/s1600/CastelDelMonte.jpg';
Picture[3]  = 'http://2.bp.blogspot.com/-7QfusEt0Rec/UDKcxF7kzHI/AAAAAAAABjI/fZ4pm8YPr74/s1600/CastelSantAngelo.jpg';


// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!

Caption[1]  = "Foto1: inizio";
Caption[2]  = "Castello antico del Medioevo, resistito sino ai giorni nostri per volonta' di mecenati del luogo";
Caption[3]  = "Foto3";

// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
var iss;
var jss = 0;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}

function control(how){
if (showHot){
if (how=="H") jss = 1;
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (jss > (pss)) jss=1;
if (jss < 1) jss = pss;
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
}}
//]]>
document.onload=showHot=true;self.focus();
-->
</script>

</HEAD>

<BODY>


<div align="center"><table border=1 cellpadding=10 cellspacing=0 width=350px>
  <tr>

    <td width=350 height=300 colspan="3" style="background-color:red;">
    <img src=http://1.bp.blogspot.com/-at2tjuIsg-M/UDKl6L5I1NI/AAAAAAAABkU/eu6zQm0wVZE/s1600/SECONDA1.gif; name=PictureBox width=350 height=300 alt="">
    </td>
  </tr>
  <tr>

    <td id=CaptionBox class=Caption align=center colspan="3" style="background-color:#FF6600";">
  Premi i pulsanti &lt; &gt;
    </td>
  </tr>

  <tr>
    <td align="center" style="background-color:#33CCCC">
    <a class=Controls href="#" onClick="javascript:control('B');" title="indietro">&lt; &lt;</a>
    </td>
    <td align="center" style="background-color:#FFFF66">
    <a class=Controls href="#" onClick="javascript:control('H');" title="inizio">| | |</a>
    </td>
    <td align="center" style="background-color:#33CCCC">
    <a class=Controls href="#" onClick="javascript:control('F');" title="avanti">&gt; &gt;</a>
    </td>
  </tr>  
</table></div>

</BODY>
</HTML>

il filter blendTrans funziona solo con MSIE

Valeria
 
Io uso Crome e nella pagina html funziona perfettamente, non saprei poi sinceramente come sostituire... :(
aspita hai corretto la riga....
Grazieeeeeeeeee, da gentiluomo ti offrirei una cena parola :)
mi permetto di scherzare proprio perchè contento....
Diamine ma un corso ben fatto... con tutti gli esempi man mano dove lo trovo ??
 
Festeggiato troppo in fretta, se incollo come sempre fatto nel gadget html del mio blog cmq non se klikko sulle freccette per far scorrere le immagini non va... mi riporta sull'head del blog :( , questo è quello che compare nel gadget...

HTML:
<style type="text/css">
<!--  

.Caption {
font-family: vivaldi;
font-weight: bold;
font-size:  22pt;
color:black;
 }

A.Controls:link    { color:#666666;
                     text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:visited { color:#666666; text-decoration:none; 
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:active  { color:#666666; text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:hover   { color:#00FF00; text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
-->
</style>
<script type="text/javascript">
<!-- 
// (C) 2003 by CodeLifter.com
// Free for all users, but leave in this header.

// ==============================
// Set the following variables...
// ==============================

//<![CDATA[

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;

var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this
var showHot = false;       // don't change this

// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines
// starting at the end of the Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!

Picture[1]  = 'http://1.bp.blogspot.com/-CXpSTjfe6QA/UDKcxLPAmOI/AAAAAAAABjE/P4gkr01LPjw/s1600/Maschio+Angioino.jpg';
Picture[2]  = 'http://2.bp.blogspot.com/-6j6mbZ7HviA/UDKcxLzN9EI/AAAAAAAABjA/4XnWT7tfQQg/s1600/CastelDelMonte.jpg';
Picture[3]  = 'http://2.bp.blogspot.com/-7QfusEt0Rec/UDKcxF7kzHI/AAAAAAAABjI/fZ4pm8YPr74/s1600/CastelSantAngelo.jpg';


// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!

Caption[1]  = "Foto1: inizio";
Caption[2]  = "Castello antico del Medioevo, resistito sino ai giorni nostri per volonta' di mecenati del luogo";
Caption[3]  = "Foto3";

// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
var iss;
var jss = 0;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}

function control(how){
if (showHot){
if (how=="H") jss = 1;
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (jss > (pss)) jss=1;
if (jss < 1) jss = pss;
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
}}
//]]>
 -->
document.onload=showHot=true;self.focus();
</script>
















<div align="center"><table border=1 cellpadding=10 cellspacing=0 width=350px>
  <tr>

    <td width=350 height=300 colspan="3" style="background-color:red;">
    <img src="http://1.bp.blogspot.com/-at2tjuIsg-M/UDKl6L5I1NI/AAAAAAAABkU/eu6zQm0wVZE/s1600/SECONDA1.gif;" name="PictureBox" width="350" height="300" alt="" />
    </td>
  </tr>
  <tr>

    <td id=captionbox class=caption align=center colspan="3" style="background-color:#FF6600";">
  Premi i pulsanti &lt; &gt;
    </td>
  </tr>

  <tr>
    <td align="center" style="background-color:#33CCCC">
    <a class=controls href="#" onclick="javascript:control('b');" title="indietro">&lt; &lt;</a>
    </td>
    <td align="center" style="background-color:#FFFF66">
    <a class=controls href="#" onclick="javascript:control('h');" title="inizio">| | |</a>
    </td>
    <td align="center" style="background-color:#33CCCC">
    <a class=controls href="#" onclick="javascript:control('f');" title="avanti">&gt; &gt;</a>
    </td>
  </tr>  
</table></div>
 
Ciao,

prova aggiungendo una istruzione return con valore falso nei link, il # è un link a tutti gli effetti se non c'è un return false ti porta a inizio pagina.


Codice:
<td align="center" style="background-color:#33CCCC">
    <a class=Controls href="#" onClick="javascript:control('B'); return false" title="indietro">&lt; &lt;</a>
    </td>
    <td align="center" style="background-color:#FFFF66">
    <a class=Controls href="#" onClick="javascript:control('H'); return false" title="inizio">| | |</a>
    </td>
    <td align="center" style="background-color:#33CCCC">
    <a class=Controls href="#" onClick="javascript:control('F'); return false" title="avanti">&gt; &gt;</a>


Valeria.
 
Ciao,

rispetta come sono scritte le dichiarazione dei vari metodi maiuscole e minuscole.

Codice:
<div align="center"><table border=1 cellpadding=10 cellspacing=0 width=350px>
  <tr>

    <td width=350 height=300 colspan="3" style="background-color:red;">
    <img src="http://1.bp.blogspot.com/-at2tjuIsg-M/UDKl6L5I1NI/AAAAAAAABkU/eu6zQm0wVZE/s1600/SECONDA1.gif;" name="PictureBox" width="350" height="300" alt="" />
    </td>
  </tr>
  <tr>

    <td id=[B]CaptionBox[/B] class=[B]Caption[/B] align=center colspan="3" style="background-color:#FF6600";">
  Premi i pulsanti &lt; &gt;
    </td>
  </tr>

  <tr>
    <td align="center" style="background-color:#33CCCC">
    <a class=[B]Controls[/B] href="#" onclick="javascript:control('B'); [B]return false[/B]" title="indietro">&lt; &lt;</a>
    </td>
    <td align="center" style="background-color:#FFFF66">
    <a class=[B]Controls[/B] href="#" onclick="javascript:control('H');" title="inizio">| | |</a>
    </td>
    <td align="center" style="background-color:#33CCCC">
    <a class=[B]Controls[/B] href="#" onclick="javascript:control('F');" title="avanti">&gt; &gt;</a>
    </td>
  </tr>  
</table></div>


Valeria.
 
Gentilissima Valeria chiaramente non finisco di ringraziarti.... ma anche incollando la tua parte di codice nel blog non va... compaiono le immagini ma appena klikko sulle freccette mi riporta sul top del blog....

ti posto tutto il codice , ormai sono desolato.... auff...

HTML:
<HTML>
<HEAD>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="imagetoolbar" content="no" />


<style type="text/css">
<!--  

.Caption {
font-family: vivaldi;
font-weight: bold;
font-size:  22pt;
color:black;
 }

A.Controls:link    { color:#666666;
                     text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:visited { color:#666666; text-decoration:none; 
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:active  { color:#666666; text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:hover   { color:#00FF00; text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
-->
</style>
<script type="text/javascript">
<!-- 
// (C) 2003 by CodeLifter.com
// Free for all users, but leave in this header.

// ==============================
// Set the following variables...
// ==============================

//<![CDATA[

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;

var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this
var showHot = false;       // don't change this

// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines
// starting at the end of the Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!

Picture[1]  = 'http://1.bp.blogspot.com/-CXpSTjfe6QA/UDKcxLPAmOI/AAAAAAAABjE/P4gkr01LPjw/s1600/Maschio+Angioino.jpg';
Picture[2]  = 'http://2.bp.blogspot.com/-6j6mbZ7HviA/UDKcxLzN9EI/AAAAAAAABjA/4XnWT7tfQQg/s1600/CastelDelMonte.jpg';
Picture[3]  = 'http://2.bp.blogspot.com/-7QfusEt0Rec/UDKcxF7kzHI/AAAAAAAABjI/fZ4pm8YPr74/s1600/CastelSantAngelo.jpg';


// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!

Caption[1]  = "Foto1: inizio";
Caption[2]  = "Castello antico del Medioevo, resistito sino ai giorni nostri per volonta' di mecenati del luogo";
Caption[3]  = "Foto3";

// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
var iss;
var jss = 0;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}

function control(how){
if (showHot){
if (how=="H") jss = 1;
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (jss > (pss)) jss=1;
if (jss < 1) jss = pss;
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
}}
//]]>
 -->


document.onload=showHot=true;self.focus();
</script>

</HEAD>


<BODY>


<div align="center"><table border=1 cellpadding=10 cellspacing=0 width=350px>
  <tr>

    <td width=350 height=300 colspan="3" style="background-color:red;">
    <img src="http://1.bp.blogspot.com/-at2tjuIsg-M/UDKl6L5I1NI/AAAAAAAABkU/eu6zQm0wVZE/s1600/SECONDA1.gif;" name="PictureBox" width="350" height="300" alt="" />
    </td>
  </tr>
  <tr>

    <td id=CaptionBox class=Caption align=center colspan="3" style="background-color:#FF6600";">
  Premi i pulsanti &lt; &gt;
    </td>
  </tr>

  <tr>
    <td align="center" style="background-color:#33CCCC">
    <a class=Controls href="#" onclick="javascript:control('B'); return false" title="indietro">&lt; &lt;</a>
    </td>
    <td align="center" style="background-color:#FFFF66">
    <a class=Controls href="#" onclick="javascript:control('H');" title="inizio">| | |</a>
    </td>
    <td align="center" style="background-color:#33CCCC">
    <a class=Controls href="#" onclick="javascript:control('F');" title="avanti">&gt; &gt;</a>
    </td>
  </tr>  
</table></div>

</BODY>
</HTML>

se vuoi ti linko anche il mio blog cosi vedrai cosa succede ma avvertimi se vuoi.... non desidero disturbarti .... Ciao Domenico.
 
Ciao,

basta un poco di attenzione:

Corretto:

Codice:
//]]>
[B]document.onload=showHot=true;self.focus();
-->[/B]


Errato come è postato


Codice:
 //]]>
 -->
document.onload=showHot=true;self.focus();;

se usi i commenti nei js <!-- --> subito dopo script e prima di /script
 
ok corretto :)

HTML:
function control(how){
if (showHot){
if (how=="H") jss = 1;
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (jss > (pss)) jss=1;
if (jss < 1) jss = pss;
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
}}
//]]>




document.onload=showHot=true;self.focus();

 -->
      </script>

</HEAD>

ma indovina, nel blog fa sempre la stessa cosa :(
chiaramente ho sostituito con le correzioni....

---> ma perchè ho voluto fare un blog ? <--------
 
Gentilissima Valeria chiaramente non finisco di ringraziarti.... ma anche incollando la tua parte di codice nel blog non va... compaiono le immagini ma appena klikko sulle freccette mi riporta sul top del blog....

ti posto tutto il codice , ormai sono desolato.... auff...

HTML:
<HTML>
<HEAD>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="imagetoolbar" content="no" />


<style type="text/css">
<!--  

.Caption {
font-family: vivaldi;
font-weight: bold;
font-size:  22pt;
color:black;
 }

A.Controls:link    { color:#666666;
                     text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:visited { color:#666666; text-decoration:none; 
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:active  { color:#666666; text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
A.Controls:hover   { color:#00FF00; text-decoration:none;
                     font-family: Arial;
                     font-size:   14pt;
                     font-weight: bold; }
-->
</style>
<script type="text/javascript">
<!-- 
// (C) 2003 by CodeLifter.com
// Free for all users, but leave in this header.

// ==============================
// Set the following variables...
// ==============================

//<![CDATA[

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;

var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this
var showHot = false;       // don't change this

// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines
// starting at the end of the Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!

Picture[1]  = 'http://1.bp.blogspot.com/-CXpSTjfe6QA/UDKcxLPAmOI/AAAAAAAABjE/P4gkr01LPjw/s1600/Maschio+Angioino.jpg';
Picture[2]  = 'http://2.bp.blogspot.com/-6j6mbZ7HviA/UDKcxLzN9EI/AAAAAAAABjA/4XnWT7tfQQg/s1600/CastelDelMonte.jpg';
Picture[3]  = 'http://2.bp.blogspot.com/-7QfusEt0Rec/UDKcxF7kzHI/AAAAAAAABjI/fZ4pm8YPr74/s1600/CastelSantAngelo.jpg';


// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!

Caption[1]  = "Foto1: inizio";
Caption[2]  = "Castello antico del Medioevo, resistito sino ai giorni nostri per volonta' di mecenati del luogo";
Caption[3]  = "Foto3";

// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
var iss;
var jss = 0;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}

function control(how){
if (showHot){
if (how=="H") jss = 1;
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (jss > (pss)) jss=1;
if (jss < 1) jss = pss;
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
}}
//]]>
 -->


document.onload=showHot=true;self.focus();
</script>

</HEAD>


<BODY>


<div align="center"><table border=1 cellpadding=10 cellspacing=0 width=350px>
  <tr>

    <td width=350 height=300 colspan="3" style="background-color:red;">
    <img src="http://1.bp.blogspot.com/-at2tjuIsg-M/UDKl6L5I1NI/AAAAAAAABkU/eu6zQm0wVZE/s1600/SECONDA1.gif;" name="PictureBox" width="350" height="300" alt="" />
    </td>
  </tr>
  <tr>

    <td id=CaptionBox class=Caption align=center colspan="3" style="background-color:#FF6600";">
  Premi i pulsanti &lt; &gt;
    </td>
  </tr>

  <tr>
    <td align="center" style="background-color:#33CCCC">
    <a class=Controls href="#" onclick="javascript:control('B'); return false" title="indietro">&lt; &lt;</a>
    </td>
    <td align="center" style="background-color:#FFFF66">
    <a class=Controls href="#" onclick="javascript:control('H');" title="inizio">| | |</a>
    </td>
    <td align="center" style="background-color:#33CCCC">
    <a class=Controls href="#" onclick="javascript:control('F');" title="avanti">&gt; &gt;</a>
    </td>
  </tr>  
</table></div>

</BODY>
</HTML>

se vuoi ti linko anche il mio blog cosi vedrai cosa succede ma avvertimi se vuoi.... non desidero disturbarti .... Ciao Domenico.

Ciao,

dimenticavo, come già detto qualche post sopra il # senza un return false ti porta la pagina a top, puoi scrivere i link in questo modo per evitarlo.

Codice:
<a class=Controls href="javascript:void(0)" onclick="javascript:control('B');" title="indietro">&lt; &lt;</a>

<a class=Controls href="#" onclick="javascript:control('F'); return false" title="avanti">&gt; &gt;</a>

il return false istruisce il browser a dichiarare falso l'href e di eseguire solo onclick javascript:void(0) nell'href fa la stessa cosa.

sistema come sopra:

//]]>
document.onload=showHot=true;self.focus();
-->


deve essere scritto cosi.

Valeria.
 
allora ho messo cosi :

HTML:
 <tr>
    <td align="center" style="background-color:#33CCCC">
    <a class=controls href="javascript:void(0)" onclick="javascript:control('b');" title="indietro">&lt; &lt;</a>
    </td>
    <td align="center" style="background-color:#FFFF66">
    <a class=controls href="javascript:void(0)" onclick="javascript:control('h'); " title="inizio">| | |</a>
    </td>
    <td align="center" style="background-color:#33CCCC">
    <a class=controls href="javascript:void(0)" onclick="javascript:control('f'); " title="avanti">&gt; &gt;</a>
    </td>
  </tr>  
</table></div>

adesso mi fa andare avanti di una foto ma poi non mi fa proseguire ne tornare indietro ne all'inizio... ti prego solo un attimo di pazienza... mi posti tutto il td se non ti dispiace, tanto tu il problema l'hai individuato... scusa.... :))
e scusami per l'errore del onboard , avevo corretto solo che non salvato e quindi ritornato come prima----
 

Discussioni simili