Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9037625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:17:24+00:00 2026-06-16T09:17:24+00:00

I have a vertical scrolling script that works nicely for me, but the problem

  • 0

I have a vertical scrolling script that works nicely for me, but the problem is that it stops after some time. How to modify the script so that it will keep scrolling infinitely from top to last again and again?
Here is the code:

<html>
<head>
<style type="text/css">
.frame {
font:12px arial;
width:200;
height:300;
border:none;
overflow: hidden;
border:1px solid black;
padding:5;
}
</style>
<script language="javascript">
i = 0
var speed = 1
function scroll() {
i = i + speed
var div = document.getElementById("news")
div.scrollTop = i
if (i > div.scrollHeight - 160) {i = 0}
t1=setTimeout("scroll()",100)
}
</script>
</head>
<body onload="scroll()">
<div class="frame" id="news" onmouseover="clearTimeout(t1)" onmouseout="scroll()" >
Some Text text 1<br>
Some Text text 2<br>
Some Text text 3<br>
Some Text text 4<br>
Some Text text 5<br>
Some Text text 6<br>
Some Text text 7<br>
Some Text text 8<br>
Some Text text 9<br>
Some Text text 10<br>
Some Text text 11<br>
Some Text text 12<br>
Some Text text 13<br>
Some Text text 14<br>
Some Text text 15<br>
Some Text text 16<br>
Some Text text 17<br>
Some Text text 18<br>
Some Text text 19<br>
Some Text text 20<br>
Some Text text 21<br>
</div>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T09:17:25+00:00Added an answer on June 16, 2026 at 9:17 am

    it actually not stops.
    Try to update the if() condition to

    if (i > div.scrollHeight - 300) {i = 0}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background I have been asked to write a script that will create a vertical
I would like a textblock that has vertical scrolling. I have the following XAML
I have written a file using html and javascript. In that Vertical scrolling should
I have a scrollview with both horizontal and vertical scrolling but I would like
I have a textarea that I want to enable vertical scrolling. When I exceed
I have a ListView within a panel that has vertical scrolling enabled and absolute
I have a need for both horizontal and vertical scrolling of some data in
i have problem with image vertical-align in div .img_thumb { float: left; height: 120px;
I have a page that has no vertical scroll, rather, everything is displayed horizontally.
I have a vertical scrolling website (lots of in-page links). I also have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.