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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:01:48+00:00 2026-06-10T02:01:48+00:00

I ve a problem with the output:i want to fill the ouptput whit some

  • 0

I ve a problem with the output:i want to fill the ouptput whit some data from an ajaxcall.
the call is successfull(the output inside the each is filled with data)
but the output inside the each issnt apended to the output outside .
i always geht “

<ul id="listname" data-inset=true></ul>

and not

  <ul id="listname" data-inset=true><li>some data</li></ul>

 

$("div:jqmData(role='collapsible')").each(function(){
var id = $(this).data("id");
     var idDate=id.slice(7,18);
     var listapp="id_col_"+idDate;
      var listname="id_col_"+idDate;
                   output='<ul id="listname" data-inset=true>';

                             $.ajax({
                             url: 'lomodata.php',
                             data: 'timestamp='+idDate,
                             type: 'GET',
                             ContentType: "application/json",
                             dataType: "json",
                             success:function(res) {
                             if(res !='')
                            {
                            $.each(res, function(i, Object) {
                             output+='<li>'+Object.reg+'</li>';
                              console.log(output);
                            }); 
                             }
                             }

                             });

                    output+='</ul>';

                    $(this).append(output).trigger("create");
                    $(this).listview();
                    $(this).listview('refresh');
});
  • 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-10T02:01:50+00:00Added an answer on June 10, 2026 at 2:01 am

    AJAX is Asynchronous. When you write $.ajax( ... ), an HTTP request will be sent to the server, which will then move on to the next operation, output += '</ul>'. The HTTP request will not have finished by this time, and so your callback will not yet have been executed by the time you append output to the document.

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

Sidebar

Related Questions

Problem I have some pages that need dynamic data from website to generate output
I want to output some dynamic data from an ASP.NET website to Excel. I
I'm currently having a problem with some Socket stuff. The output that I want
The problem is that I want to output Mathematica compatible floating point numbers. The
I've a problem with encoding. The output I want is: string(17) New &amp; old
My problem is like this question but I am fetching data from different table:
I have a problem that output string must be utf8-formatted, I am writing currently
So I have this problem where the output prints the address of my pointer,
could anyone take a look at this for me? Problem: trying to output a
Problem Statement is : Given 2 Dimensional array, print output for example If 4

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.