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 6138029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:47:58+00:00 2026-05-23T17:47:58+00:00

Essentially, it is supposed to be a scrolling iFrame, that, once it hits the

  • 0

Essentially, it is supposed to be a scrolling iFrame, that, once it hits the bottom, resets to the top. These functions all work fine. However, (note that this is in an .asp file) I also need a function that, when the user mouses over the window, stops the scrolling. It works, but when the user mouses around on the window, not keeping their mouse still, the scrolling occurs, in fact, it even scrolls faster. Any suggestions?

    <html>
    <head>
        <link href="intranet.css" rel="stylesheet" type="text/css">
        <style>
        </style>
        <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2.min.js" type="text/javascript"></script>
        <script type="text/javascript">
            var num2 = 3;
            function getheight() {
                console.log(num2);
                var myWidth = 0,
            myHeight = 0;
                if (typeof (window.innerWidth) == 'number') {
                    //Non-IE
                    myWidth = window.innerWidth;
                    myHeight = window.innerHeight;
                } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
                    //IE 6+ in 'standards compliant mode'
                    myWidth = document.documentElement.clientWidth;
                    myHeight = document.documentElement.clientHeight;
                } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
                    //IE 4 compatible
                    myWidth = document.body.clientWidth;
                    myHeight = document.body.clientHeight;
                }
                var scrolledtonum = window.pageYOffset + myHeight + 2;
                var heightofbody = document.body.offsetHeight;
                if (scrolledtonum >= heightofbody) {
                    window.scroll(0, 0);
                }
            }

            window.onscroll = getheight;

            function pageScroll() {
                num2 = 3;
                clearTimeout(scrolldelay);
                pageScroller();
            }
            function unpageScroll() { num2 = 0; }
            function pageScroller() {
                window.scrollBy(0, num2);
                scrolldelay = setTimeout('pageScroller()', num);
            }
            var num = 50;
            window.onmouseout = pageScroll;
            window.onmouseover = unpageScroll;
        </script>
    </head>
    <body onLoad="pageScroller()">
    <p></p>
    <br />
    <p></p>
    <br />
    <div id="datacontainer" style="position:relative;width:100%;text-align:center;" onMouseover="unpageScroll" onMouseout="unpageScroll">

    <!-- ADD YOUR SCROLLER COMMENT INSIDE HERE--------------------->
    <font face="Arial, Helvetica, sans-serif" size="1">
    <br>
    <center>
    <font size=2>
<!-- CONTENT-->
<!-- Closing tags --->
  • 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-05-23T17:47:59+00:00Added an answer on May 23, 2026 at 5:47 pm

    This simple script seems to work, perhaps you can deduce from it how to alter your script: http://jsfiddle.net/xkuZF/1/.

    function func() {
        document.body.scrollTop++;
    }
    
    document.body.onmouseover = function() {
        clearInterval(interval);
    };
    
    document.body.onmouseout = function() {
        interval = setInterval(func);
    };
    
    var interval = setInterval(func);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a buissness-application that is essentially a Home-screen, and is supposed to
Here's what I am trying to do: Build a custom control that essentially is
I have a receive callback from an async client method that is supposed to
I am doing some animation based on an algorithm that is supposed to render
I am working on an app for a business that is essentially a catalog.
I am writing a server in linux that is supposed to serve an API.
Heres the problem. I have an app that is essentially an image gallery, it
Essentially I want to know if in VB.NET 2005 if using a sqlcommand and
Essentially the only thing I can deploy to my deployment machine is a JAR
Essentially, I have to get a flat file into a database. The flat files

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.