Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do you autoscroll on page load?
11-01-2011, 10:26 PM
Post: #1
How do you autoscroll on page load?
I would like to know the code for making a page autoscroll when it is first loaded. I would like it to scroll after about a 2 second delay. Is this possible? I am a amature at this so I would appreciate your help. Thanks

Smash Repairs Perth | Car Smash Repairs Perth|panel beater perth
Find all posts by this user
Quote this message in a reply
11-02-2011, 04:05 PM
Post: #2
RE: How do you autoscroll on page load?
You can check this site here.

SEO Brisbane | Iphone repairs Sydney
Find all posts by this user
Quote this message in a reply
11-08-2011, 11:24 PM
Post: #3
RE: How do you autoscroll on page load?
This will be helpful for you.

<SCRIPT language=JavaScript1.2>
//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 scrollwindow(){
if (document.all &&
!document.getElementById)
temp=document.body.scrollTop
else
temp=window.pageYOffset
if (alt==0)
alt=2
else
alt=1
if (alt==0)
curpos1=temp
else
curpos2=temp
if (curpos1!=curpos2){
if (document.all)
currentpos=document.body.scrollTop+speed
else
currentpos=window.pageYOffset+speed
window.scroll(0,currentpos)
}
else{
currentpos=0
window.scroll(0,currentpos)
}
}
function startit(){
setInterval("scrollwindow()",400)
}
window.onload=initialize
</SCRIPT>

SEO Services | Web Marketing | Internet Marketing
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)