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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:48:27+00:00 2026-05-24T03:48:27+00:00

I am having a very hard time finding a good resources or any idea

  • 0

I am having a very hard time finding a good resources or any idea on how to accomplish the following:

Using jquery get some data
  1. Use jquery to fetch some data. Now what syntax should the data be in. Go to step 2.
  2. Again using jquery, assign that data to multiple variables and tags on the html page. I know how to replace 1 tag. But I wanna refresh multiple divs, tags, ids. Go to step 3.
  3. Now go back to step 1 after some time.

I have tried my friend GOOGLE but it can’t find the pages that I am looking for. I would really appreciate some code here but a link to a tutorial wouldn’t be too bad either.

  • 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-24T03:48:27+00:00Added an answer on May 24, 2026 at 3:48 am

    1) $.ajax() seems like a good idea, use it to fetch data in the JSON-format:

    $.ajax({
      url: url,
      dataType: 'json',
      data: data,
      success: callback //Assign data and stuff here
    });
    

    2) Do that in the success-parameter, as a new function. success: function() {}

    success: function() {
        $('div#1').html('foo');
        $('h1#1').html('woo');
    }
    

    3) Wrap your $.ajax()-call in an interval:

    var refresh = setInterval(function()
    $.ajax({
          url: url,
          dataType: 'json',
          data: data,
          success: callback //Assign data and stuff here
         });
     }, 60000);
    

    Edit (response to the comment below):

    Try doing it the following way, as you’re not usin a function() as a callback:

    function() { 
        $.ajax({ 
            url: "/admin/ajax/all_data.php", 
            dataType: 'json', 
            data: data, 
            success: function(data) {
                $("#testdiv1").html(data.testdiv1); 
                //$("#testdiv2").html(data.testdiv2); 
                //$("#testdiv3").html(data.testdiv3); 
            }
        }); 
    }), 2000);
    

    Let me know if this works out for you.

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

Sidebar

Related Questions

I've been having a very hard time finding good examples of UIScrollView. Even Apple's
I am having a very hard time finding resources that talk about the windows
I am having a very hard time finding a standard pattern / best practice
I'm very new to PHP and having a hard time finding this answer as
I am having a hard time trying to make the very last UITableViewCell from
I'm having a hard time figuring out how to implement a factory pattern in
I'm having a hard time phrasing this question in such a way that doesn't
I am trying to setup this python library and am having a very hard
I'm having a hard time wrapping my head around this Django query. I could
I am facing a conceptual problem that I am having a hard time overcoming.

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.