Ciao a tutti o un serio problema e spero che voi mi aiutate a risolvere....io ho fatto uno script per una pagina web che manda a video un'altra pagina web e quest'ultima tramite javascript scrolli automaticamente in modo infinito e cioè torna all'inizio dopo aver scollato automaticamente verso il basso....vi posto il codice html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Risultati in diretta</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
</head>
<frameset frameborder="no" border="0" framespacing="0">
<frame src="http://www.diretta.it/"/>
</frameset>
<body width = "100%" height = "100%">
</body>
<script language="JavaScript1.2">
/*
Top-Down scrolling window Script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, visit http://www.dynamicdrive.com
This notice MUST stay intact for use
*/
//change 1 to another integer to alter the scroll speed. Greater is faster
var speed=1
var currentpos=0,alt=1,curpos1=0,curpos2=-1
function initialize(){
startit()
}
function iecompattest(){
return (document.compatMode!="BackCompat")? document.documentElement : document.body
}
function scrollwindow(){
if (document.all)
temp=iecompattest().scrollTop
else
temp=window.pageYOffset
if (alt==0)
alt=1
else
alt=0
if (alt==0)
curpos1=temp
else
curpos2=temp
if (curpos1!=curpos2){
if (document.all)
currentpos=iecompattest().scrollTop+speed
else
currentpos=window.pageYOffset+speed
window.scroll(0,currentpos)
}
else{
currentpos=0
window.scroll(0,currentpos)
}
}
function startit(){
setInterval("scrollwindow()",1)
}
window.onload=initialize
</script>
</html>
come potete vedere ho usato un frame scr per visualizzare la pagina che dovrà apparire, prima ho inserito il codice javascript per farlo scrollare automaticamente...purtroppo all'apertura dell apagina web non scrolla mi visualizza solo la pagina web senza scroll...forse non ho posizionato bene il codice javascript.....chi mi da una mano per favore?