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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:13:07+00:00 2026-06-13T19:13:07+00:00

I am using a div refresh script (Given below). The contents of the div

  • 0

I am using a div refresh script (Given below). The contents of the div contains an auto scroll ul (code from http://www.dynamicdrive.com/). The refresh is working properly. But after the refresh the auto scrolling is not working

Code for refresh

    <script type="text/javascript">
        window.onload = setupRefresh;
        function setupRefresh()
        {
            setInterval("refreshBlock();",1000);
        }

        function refreshBlock()
        {
            $('#list4').load("refreshpage");

        }
    </script>

Code for auto scroll

    <script type="text/javascript">

        var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
        var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
        var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

        var copyspeed=marqueespeed
        var pausespeed=(pauseit==0)? copyspeed: 0
        var actualheight=''

        function scrollmarquee(){
            if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
                cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
            else
                cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
        }

        function initializemarquee(){
            cross_marquee=document.getElementById("vmarquee")
            cross_marquee.style.top=0
            marqueeheight=document.getElementById("list4").offsetHeight
            actualheight=cross_marquee.offsetHeight
            if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
                cross_marquee.style.height=marqueeheight+"px"
                cross_marquee.style.overflow="scroll"
                return
            }
            setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
        }

        if (window.addEventListener)
            window.addEventListener("load", initializemarquee, false)
        else if (window.attachEvent)
            window.attachEvent("onload", initializemarquee)
        else if (document.getElementById)
            window.onload=initializemarquee


    </script>

Could some one please help?

  • 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-13T19:13:08+00:00Added an answer on June 13, 2026 at 7:13 pm

    It seems like you need to call initializemarquee() after the load is complete. You can do this in the .load()‘s callback.

    function refreshBlock(){
      $('#list4').load("refreshpage", function(){
        clearInterval(lefttime);
        initializemarquee()
      });
    }
    

    I almost forgot to add that you’d also want to stop that interval.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm using this piece of code to refresh my div every X seconds: <script>
I'm using the script below to refresh a div when the text 'view more'
I'm using the simple jQuery DIV refresh code. var refreshId = setInterval(function() { $('#refreshdash').load('dashboard.php?cache=');
I'm using this gauge in my contentplaceholder. http://www.dariancabot.com/projects/jgauge_wip/ Script: <link rel=stylesheet href=Scripts/jgauge.css type=text/css />
I am using the follwing code to refresh the div but its not working
I am using the following script to refresh a div once every minute. var
I'm using this code to refresh a div every 5000 milliseconds : (and update
Currently, I am using the following code to refresh the <div name=content> portion of
I'm using the following javascript to refresh a div on a page every 30
I'm wondering how to refresh/reload a page (or even specific div) once(!) using jQuery?

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.