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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:12:35+00:00 2026-06-03T10:12:35+00:00

Why the JQuery function doesn’t work while the ticker Updating the panel? Please see

  • 0

Why the JQuery function doesn’t work while the ticker Updating the panel? Please see the code below.

<asp:Timer ID="Schedule_Timer" runat="server" Interval="10000"></asp:Timer>    
<asp:UpdatePanel ID="Schedule_UpdatePanel" runat="server">
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="Schedule_Timer" EventName="Tick" />
    </Triggers>
    <ContentTemplate>
        <asp:Panel ID="Schedule_Panel" runat="server" Height="250px"  Width="250px">
            <asp:Literal ID="Schedule_Label" runat="server" Text=""></asp:Literal>
        </asp:Panel>
    </ContentTemplate>
</asp:UpdatePanel>

<script>
    $('#test').cycle({
        fx: 'scrollUp',
        timeout: 6000,
        delay: -2000
    });
</script>

The Schedule_Label is filled in via code-behind:

Protected Sub Schedule_Timer_Tick(sender As Object, e As System.EventArgs) Handles Schedule_Timer.Tick
    PrintTheSchedule()
End Sub

Private Sub PrintTheSchedule()
    //This is just for example, the actual data is taken from gridview based on the realtime
    Schedule_Label.Text = "<div id='test'>" & _
                "<div>test 1</div>" & _
                "<div>test 2</div>" & _
                "<div>test 3</div>" & _
                "<div>"        
End Sub

For the first 10 seconds, the JQuery do cycling the test div. But after the UpdatePanel refreshed, then the JQuery doesn’t running anymore and it caused all of the test div value showed up on the page. How to fix this problem? Thank you very much.

  • 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-03T10:12:48+00:00Added an answer on June 3, 2026 at 10:12 am

    There is a preety simple answer.

    The jquery function executed on the page load itself only. So when the Timer tick the jquery function does not remain valid again.

    So what you need to do is:

    In the PrintTheSchedule function call the javascript function again like

    IN C# i do this like

    ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "runScript", "RunScriptAgain();", true);
    

    And in the Aspx Page do

    <script>
    
     function RunScriptAgain() 
     {
      $('#test').cycle({
        fx: 'scrollUp',
        timeout: 6000,
        delay: -2000
       });
     }
    

    // Required for the first time

    $(document).ready(function() {  RunScriptAgain(); })
    

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

Sidebar

Related Questions

I made a jQuery function that binds some fields, but it doesn't work when
The following simple jQuery function works perfectly on Mozilla Firefox(5.0) but doesn't work on
The jQuery function below returns this string: '#prayer_date'.html(03/19/1968); But it doesn't get executed because
jQuery's getScript function doesn't seem to support an error callback function. I can't use
Hi my jQuery callback function does not work. Competitor = { addCompetitorForSave: function($data) {
I am newbie to jQuery, can someone explain what this code does: $(#currency form).submit(function(e)
I have this page and the jquery function doesn't seem to execute. It should
I have a Jquery autocomplete ajax function whose source is calculated from code behind.
my a click jquery function is not working, it just doesn't give any errors
I use this code to create a simple jquery carousel animation: $(document).ready(function() { var

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.