Gestion script HELP!

giancadeejay

Utente Attivo
26 Ott 2010
224
0
16
torino
Buongiorno a tutti
Premetto che di javascript sono a 0...o quasi ma avrei bisogno del vostro aiuto
Ecco il mio problema: In rete ho trovato questo script che permette la rotazione a tempo di pagine html

""
<script type="text/javascript">
var i=0,

arrPages=["QUI TUTTE LE VARIE PAGINE CHE DEVONO RUOTARE"];
function changePage(){
if(!arrPages) i=0;
document.getElementById("main").src=arrPages[i++];
}
</script>
</head>
<body>
<iframe src="http://www.miosito.com" onload="setTimeout('changePage()',15000)"
id="main" width="1348" height="375"></iframe>
<div style='display:none;'>%%MENU%%</div>
<div style='display:none;'>%%CONTENT%%</div>
<div style='padding: 20px; width:100%; text-align:fixed center;'></div>


</body>
</html>
""
Lo script e' regolato a tempo ed io l'ho impostato per 15 sec
Io vorrei che lo script soprastante venisse gestito,nella rotazione a tempo,da quest'alro script che vi posto sotto..

Come posso fare?

""


<SCRIPT language="JavaScript">


<!--Timer in JavaScript

var timerform

speed=1000

function dotimer()

{

today=new Date()

slutsec=today.getSeconds()

slutmin=today.getMinutes()

sluttim=today.getHours()

sluta=(slutsec) + 60 * (slutmin) + 3600 * (sluttim)

diff=sluta - starta

tim=Math.floor(diff / 3600)

min=Math.floor((diff / 3600 - tim) * 60)

sek=Math.round((((diff / 3600 - tim) * 60) - min) * 60)

document.timerform.timer.value=tim + ':'

if(min<10)document.timerform.timer.value+='0'

document.timerform.timer.value+=min + ':'

if(sek<10)document.timerform.timer.value+='0'

document.timerform.timer.value+=sek

window.setTimeout("dotimer()",speed)

}

function Timer()

{

today=new Date()

startsek=today.getSeconds()

startmin=today.getMinutes()

starttim=today.getHours()

starta=(startsek) + 60 * (startmin) + 3600 * (starttim)

document.write('<form name=timerform><input name=timer size=7')

document.write('></form>')

dotimer()

}

// end-->



</SCRIPT>
</head>

<body>
<table width=190>
<tr>
<td >
<FONT COLOR="#FFFF00" FONT SIZE="-1">
TEMPO:</FONT></td>
<td><SCRIPT language="JavaScript">
Timer()
</SCRIPT>
</td>
</tr>
</table>
</body>
</html>
""
Grazie a tutti in anticipo
 

Discussioni simili