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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:03:32+00:00 2026-05-20T11:03:32+00:00

How to repeat jQuery ajax call every 10 seconds? $(document).ready(function() { $.ajax({ type: GET,

  • 0

How to repeat jQuery ajax call every 10 seconds?

$(document).ready(function() {
    $.ajax({    
        type: "GET",    
        url: "newstitle.php",   
        data: "user=success",    
        success: function(msg) {
            $(msg).appendTo("#edix");    
        }  
    });

I’ve tried to wrap the $.ajax with a function and to call the function with setInterval

$(document).ready(function() {
    function ajaxd() { 
        $.ajax({
            type: "GET",
            url: "newstitle.php",
            data: "user=success",
            success: function(msg) {
                $(msg).appendTo("#edix");
            }
        });
    }
    setInterval("ajaxd()",10000);
});

But it says “ajaxd is not defined”

  • 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-20T11:03:33+00:00Added an answer on May 20, 2026 at 11:03 am

    Your method should not be placed inside the ready method, or it would only be available there and not outside.

    $(document).ready(function() {
        setInterval(ajaxd, 10000);
    });
    
    function ajaxd() { 
      $.ajax({
       type: "GET",
       url: "newstitles.php",
       data: "user=success",
       success: function(msg){
         $(msg).appendTo("#edix");
       }
     });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following jQuery code: $.ajax({ type: POST, url: /search, data: $(form).serialize(), success:
<asp:ContentPlaceHolder id=ContentPlaceHolder1 runat=server> <script src=http://ajax.aspnetcdn.com/ajax/jQuery/JScript.js type=text/javascript></script> <script src=http://ajax.aspnetcdn.com/ajax/jQuery/fns.js type=text/javascript></script> <script src=http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.min.js type=text/javascript></script> <script type=text/javascript>
I am very new to javascript and ajax/jquery and have been working on trying
I'm trying to implement jQuery tabs to replace AJAX tab container. I've followed the
I am working on a drupal site that has a form submit ajax call
Hi i have this code right now on my website... <script src=http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js type=text/javascript charset=utf-8></script>
HTML: <div id=lowerLayer> <div id=positionLayer> <div id=imageLayer> <div id=imageHolder style=background-image: url('/Images/Loading/ajax-loader.gif');> </div> </div> </div>
I have an ajax request that requests a php script that connects to my
I've got the following in my <head> section: <script type=text/javascript> $(function(){ $(h5).live(click, function(){ alert($(this).tmplItem());
i have one jquery function which i need to work in following way 1.

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.