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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:09:17+00:00 2026-05-27T17:09:17+00:00

Im experimenting with some JQuery and timing. I use the code below just for

  • 0

Im experimenting with some JQuery and timing. I use the code below just for test purpose. My problem is that my controller is only being called the first time. Subsequent calls to the method is not made. I tride making an “alert” in my javascript, it triggere each 10 secs, but my controller was never called, thus the text in “.page” never changes. Any ideas on why this is?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>
        <asp:ContentPlaceHolder ID="TitleContent" runat="server" />
    </title>
    <link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Scripts/jquery-1.4.1.min.js"></script>
</head>
<body>
<script type="text/javascript">
    $(document).ready(function () {
        window.setInterval(Update, 10000);

    });

    function Update() {
        var url = "/Home/GetTime";
        $.get(url, function (data) {
            $(".page").html(data);
        });
    }
    </script>
    <div class="page">

    </div>
</body>
</html>

The method in my controller it should call:

public string GetTime()
        {
            return "<h1>"+DateTime.Now.ToString()+"</h1>";
        }
  • 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-27T17:09:18+00:00Added an answer on May 27, 2026 at 5:09 pm

    My guess is caching if you are using Internet Explorer. You could try using the $.ajax method setting cache: false and also make sure you try it out in other browsers.

    There is also quite a bit of discussion here about what sounds like the same behaviour

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

Sidebar

Related Questions

I am doing some experimenting (so the code below has lots of stuff that
Hi I've just started experimenting with .live and .die and having some great results
I'm experimenting with some multithreading constructions, but somehow it seems that multithreading is not
I'm experimenting some difficulties trying to use Connection String Builders (ADO.NET) within LINQ to
I am experimenting with some css3 transitions. I put together a quick slider test
I am experimenting with calling a web-service using jQuery. For some reason the result
I've been experimenting with some code code on Ayende Rahien's blog here which demonstrates
I experimenting with jQuery. As I was trying I found out that I can't
I'm currently working with jQuery 1.4.2 and jQuery UI 1.8.2. I'm experiencing some weird
I'm doing some experimenting with AJAX in CakePHP and it seems to work except

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.