salve a tutti! Ho trovato questo js che dovrebbe permettermi di visualizzare news, frasi, eccetera. Ho provato ad aggiungere questo: ejs_box2_message[4] = 'Pensare è lavoro dell'intelletto, fantasticare il suo piacere. (Victor Hugo)';
che errori ho fatto? aiutatemi!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="it">
<div align="center">
<DIV ID=ejs_box2_box STYLE="background:#79A2A2;color:#000000;font-family:Verdana;font-size:11;border-style:solid;border-width:1px;border-color:#006699;width:200px;height:100px;padding:5px "></DIV>
<SCRIPT LANGUAGE=JavaScript>
ejs_box2_message = new Array;
ejs_box2_message[0] = 'Non è che io abbia paura di morire, è solo che non voglio esserci quando succederà! (Woody Allen)';
ejs_box2_message[1] = 'Recentemente ho letto la Bibbia. Non male, ma il personaggio principale e’ poco credibile. (Woody Allen)';
ejs_box2_message[2] = 'Io credo che la televisione vada guardata, ma non accesa. (Alessandro Bergonzoni)';
ejs_box2_message[3] = 'La vera libertà di stampa è dire alla gente ciò che la gente non vorrebbe sentirsi dire. (George Orwell)';
ejs_box2_message[4] = 'Pensare è lavoro dell'intelletto, fantasticare il suo piacere. (Victor Hugo)';
ejs_box2_actual = 0;
ejs_box2_html_flag = 0;
function ejs_box2_go()
{
if(document.getElementById)
{
ejs_box2_char = 1;
ejs_box2_affich(ejs_box2_actual)
ejs_box2_actual++;
if(ejs_box2_actual >= ejs_box2_message.length)
ejs_box2_actual = 0;
}
}
function ejs_box2_affich(lactual)
{
var pix = ejs_box2_message[lactual].charAt(ejs_box2_char);
if(pix == "<")
ejs_box2_html_flag = 1;
if(pix == ">")
ejs_box2_html_flag = 0;
var texte = ejs_box2_message[lactual].substring(0,ejs_box2_char);
document.getElementById("ejs_box2_box").innerHTML = texte;
if(ejs_box2_char < ejs_box2_message[lactual].length)
{
ejs_box2_char++;
if(ejs_box2_html_flag == 1)
ejs_box2_affich(lactual);
else
setTimeout("ejs_box2_affich("+lactual+")",50)
}
else
setTimeout("ejs_box2_go()",3000)
}
window.onload = ejs_box2_go;
</SCRIPT>
</div>
</html>