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.
 

Malware

Utente Attivo
19 Lug 2012
112
0
0
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
 

cavaliere123

Utente Attivo
31 Lug 2012
416
0
16
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 :))
 

Malware

Utente Attivo
19 Lug 2012
112
0
0
ciao
ecco la sintassi corretta:


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

Qua io ad esempio dovevo far partire un countdown
 

cavaliere123

Utente Attivo
31 Lug 2012
416
0
16
Grazie per prima cosa e ho sostituito cosi :

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

ma chiaramente non va... figuriamoci :(
 

cavaliere123

Utente Attivo
31 Lug 2012
416
0
16
provato anche cosi :

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


e anche :

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

e neanche ....
 

Vale2

Utente Attivo
28 Mag 2006
446
0
0
Livorno
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.
 

cavaliere123

Utente Attivo
31 Lug 2012
416
0
16
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 :)
 

Vale2

Utente Attivo
28 Mag 2006
446
0
0
Livorno
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
 

cavaliere123

Utente Attivo
31 Lug 2012
416
0
16
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 ??
 

cavaliere123

Utente Attivo
31 Lug 2012
416
0
16
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>
 

Vale2

Utente Attivo
28 Mag 2006
446
0
0
Livorno
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.
 

cavaliere123

Utente Attivo
31 Lug 2012
416
0
16
E chiaramente neanche nel blog.... e meno male che doveva essere uno script semplice grrrrrrrrrrrr....
 

Vale2

Utente Attivo
28 Mag 2006
446
0
0
Livorno
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.
 

cavaliere123

Utente Attivo
31 Lug 2012
416
0
16
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.
 

Vale2

Utente Attivo
28 Mag 2006
446
0
0
Livorno
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
 

cavaliere123

Utente Attivo
31 Lug 2012
416
0
16
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 ? <--------
 

Vale2

Utente Attivo
28 Mag 2006
446
0
0
Livorno
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.
 

cavaliere123

Utente Attivo
31 Lug 2012
416
0
16
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
Autore Titolo Forum Risposte Data
max_400 Sostituire un div con un altro il comando innerHTML è bloccato Javascript 0
D Sostituire img con altre img Photoshop 1
P [MS Access] Sostituire un carattere in tutta la tabella MS Access 11
Shyson [MySQL] Sostituire testo in in articolo MySQL 0
elpirata [MySQL] Sostituire valori campi con dati casuali MySQL 4
P [Photoshop] Sostituire i colori in modo preciso Photoshop 0
C [PHP] SOSTITUIRE VALORI DENTRO STRINGA PHP 0
elpirata [PHP] Sostituire if ed elseif con operatore ternario switch PHP 9
L [PHP] Sostituire link da stringa PHP 3
ecosito [WORDPRESS] Sostituire la cartella d'installazione? WordPress 2
S [Javascript] Sostituire elemento HTML preso randomicamente dentro array Javascript 1
M Sostituire le funzioni mysql con mysqli, ma quali? PHP 4
S Sostituire link con button. PHP 1
M sostituire parte di URL con espressioni regolari PHP PHP 8
Marco_88 Come sostituire valori in un campo per più oggetti. MySQL 2
JackIlPazzo Sostituire una riga specifica in un file di testo senza cancellare il rimanente PHP 13
A sostituire "onload" nel tag <img> con Js Javascript 17
C Sostituire virgola con punto form PHP 2
P sostituire form con jquery jQuery 0
F sostituire un'immagine con jquery jQuery 2
felino Temperatura processore: soglia massima per sostituire pasta termica Hardware 2
Trapano sostituire iframe PHP 5
C Sostituire molte righe di codice PHP 2
L sostituire un carattere in una stringa acquisita da input jQuery 1
S sostituire codice html in molti file HTML e CSS 1
N [RISOLTO] Sostituire Input con a href PHP 10
Shyson Sostituire onclick Javascript 2
P Sostituire immagine in una cartella. PHP 6
M sostituire bottone con onchange submit Javascript 7
S Sostituire immagini in sequenza Javascript 4
C In una textarea sostituire il carattere \n in <br/> Javascript 14
Erzsébeth Sostituire richiamo immagini PHP 4
IImanuII Php sostituire un iframe PHP 4
zighy Sostituire dati database PHP 7
M sostituire un valore con un altro corrispondente PHP 11
A Sostituire una sottostringa a una stringa data PHP 11
L Sostituire file_get_contents ? PHP 10
N leggere/sostituire/restituire file txt PHP 1
Z Onclick : sostituire odiosi "button" con semplici Links Javascript 13
U Sostituire le funzionalità di un pulsante con un testo HTML e CSS 0
S E' possibile sostituire un dominio con un altro? Domini 4
webbetto Sostituire un campo vuoto Database 4
F comando di inclusione file audio in I-Pad non funziona HTML e CSS 1
F [Javascript] comando innerHTML non funziona Javascript 5
L [PHP] comando curl ad una pagin web PHP 1
Francesco Oliviero Aggiungere comando a pulsante HTML HTML e CSS 1
C [PHP] Esecuzione comando contenuto in stringa PHP 2
T comando esatto per MYSQL PHP 2
G [PHP] composer: forzare l'uso del comando require-dev PHP 0
G [Javascript] eseguire test-case Selenium da riga di comando... Javascript 0

Discussioni simili