Timed Export
Posted: Wed, 27. Sep 2006 1:53
Hello! My name is João Lopes and I am part of the team of the Ministry of the Defense of Brazil in the organization of the Military World championship.
I was working with the times exported in html, for the public's visualization,
and it was not updating the page in the frame, stopping when arriving in the end of the report.
This problem was probably owed to the cookie.
Then I made a simpler script and that makes the same thing, and it would like that was tested by you:
<script language="JavaScript1.2">
var scrollspeed=1
var currentpos=0,alt=1,curpos1=0,curpos2=-1
function initialize(){
startit()
}
function scrollwindow(){
if (document.all)
temp=document.body.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=document.body.scrollTop+ scrollspeed
else
currentpos=window.pageYOffset+ scrollspeed
window.scroll(0,currentpos)
}
else{
javascript:history.go(0)
currentpos=0
window.scroll(0,currentpos)
}
}
function startit(){
setInterval("scrollwindow()",60)
}
window.onload=initialize
</script>
In tests done here he worked well, not being necessary the use of the cookies (that is the most interesting).
Congratulations for the excellent system that is Helga. I wait to be helping.
Regards,
João Edilson Lopes
Brasil
I was working with the times exported in html, for the public's visualization,
and it was not updating the page in the frame, stopping when arriving in the end of the report.
This problem was probably owed to the cookie.
Then I made a simpler script and that makes the same thing, and it would like that was tested by you:
<script language="JavaScript1.2">
var scrollspeed=1
var currentpos=0,alt=1,curpos1=0,curpos2=-1
function initialize(){
startit()
}
function scrollwindow(){
if (document.all)
temp=document.body.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=document.body.scrollTop+ scrollspeed
else
currentpos=window.pageYOffset+ scrollspeed
window.scroll(0,currentpos)
}
else{
javascript:history.go(0)
currentpos=0
window.scroll(0,currentpos)
}
}
function startit(){
setInterval("scrollwindow()",60)
}
window.onload=initialize
</script>
In tests done here he worked well, not being necessary the use of the cookies (that is the most interesting).
Congratulations for the excellent system that is Helga. I wait to be helping.
Regards,
João Edilson Lopes
Brasil