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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:01:09+00:00 2026-06-07T03:01:09+00:00

I havent tried this before and my solution hasnt worked. In mysql I would

  • 0

I havent tried this before and my solution hasnt worked.

In mysql I would be able to write it using a while loop but im trying to pull the data through ajax.

Can someone help

var qString = 'country=' +country+'&continent='+continent;

$.post('/assets/inc/get-country.php', qString, function (data) {    
    $('#'+continent).append('<li>'+data[0].country+' '+data[0].company+'</li>');
}, "json");

The above returns in console.log’s ajax response the following

[{
    "continent": "Europe",
    "country": "Spain",
    "company": "Universidade de Vigo CITI",
    "comments": "We are very satisfied with the disrupter. It's equipment is very easy to use and effective in breaking cells. I also would like to thank Constant System for for the assistance provided."
}, {
    "continent": "Europe",
    "country": "Spain",
    "company": "IPLA",
    "comments": "The Constant Systems cell disruptor has made extraction of membrane proteins from Gram positives a reproducible and efficient task in our lab."
}]

How can I get this to display as an li list on my page?

Thanks in advance

EDIT

$("#comments-tabs div.country a").click(function(e){
    e.preventDefault();
    var continent = $(this).parent().attr("id");
    var country = $(this).attr("name");
    console.log(continent+country);
var qString = 'country=' +country+'&continent='+continent;
    $.post('/assets/inc/get-country.php', qString, function (data) {    
        for(company_nr in data){
            $('#'+continent).append('<li>'+data[company_nr].country+' '+data[company_nr].company+'</li>')
        }
    }, "json");
});
  • 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-07T03:01:10+00:00Added an answer on June 7, 2026 at 3:01 am

    Just loop it in javascript:

    function (data)
    {
       for(company_nr in data)
       {
          $('#'+continent).append('<li>'+data[company_nr].country+' '+data[company_nr].company+'</li>')
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Surprised that i havent been able to find this myself, but anyway. Let's say
This should be the easiest thing in the world, but I haven't tried to
I think this has been asked before but even though I searched Google I
I know this has been asked before but I have looked at every answer
I tried this with xml, but the behavior was odd from firefox to IE.
Okay, I know this has been asked before, but the solutions to previously asked
I have tried to find some articles on my problem, but haven't found anything
I have tried several things so far, but I haven't had much luck yet.
I have looked online and i havent been able to fix a problem that
Update below... Ok, ive got a problem here. Im using this excellent vimeo class

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.