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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:45:16+00:00 2026-06-08T21:45:16+00:00

The only way I can think to do a postback on a 3 second

  • 0

The only way I can think to do a postback on a 3 second delay right now is like this.

setInterval("__doPostBack('UpdatePanel1', '' )", 3000); 

The problem I run into is that it posts back every 3 seconds. Is there a better way to do this or a way to clear interval on this? I am using an asp updatepanel control.

Here is my complete javascript code to give you an idea of what I am trying to do:

    var delayb4scroll = 1000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
    var marqueespeed = 2 //Specify marquee scroll speed (larger is faster 1-10)
    var pauseAtBottom = 3000 //Pause at the end of the scroll for this many seconds (3000 = 3 seconds)
    var copyspeed = marqueespeed
    var actualheight = ''
    var boolRunOnce = ''

    function pageLoad() {
        initializemarquee();
    }

    function scrollmarquee() {
        if (parseInt(cross_marquee.style.top) - 975 > (actualheight * (-1) + 8)) //if scroller hasn't reached the end of its height
            cross_marquee.style.top = parseInt(cross_marquee.style.top) - copyspeed + "px" //move scroller upwards
        else { //else, scrollbar has reached the bottom, display for 3 seconds then postback
            setInterval("__doPostBack('UpdatePanel1', '' )", 3000);        
        }
    }

    function initializemarquee() {
        cross_marquee = document.getElementById("vmarquee")
        cross_marquee.style.top = 0
        marqueeheight = document.getElementById("marqueecontainer").offsetHeight
        actualheight = cross_marquee.offsetHeight //height of marquee content (much of which is hidden from view)       
        setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
    }
  • 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-08T21:45:17+00:00Added an answer on June 8, 2026 at 9:45 pm
    setTimeout(function() { __doPostBack('UpdatePanel1', '' ); }, 3000);
    

    will run only once.

    or you can use the return value from setInterval as a reference to your interval thread, which can then be cleared;

    myInterval = setInterval(function() { __doPostBack('UpdatePanel1', '' ); }, 3000);
    //later
    clearInterval(myInterval);
    

    Edit: correct, function syntax added as per comments.

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

Sidebar

Related Questions

This is the only way i can think of looks like this: var =
How can you do something like the following? $('.myDivs').ontouchstart(function(){ alert('touch'); }) the only way
I mean in operating systems or their applications. The only way I can think
In a case of a custom view, the only way i can think of
How can I make the radio select required? The only way I can think
The only way I can figure how to secure folders, is to include a
It would appear that FileReference.upload() is the only way in which you can upload
Is there any way I can log a Wordpress user in given only their
Using htmlentities() is there a way I can set to allow only <b> and
Using only grep and sed, is there a way I can tranform the output

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.