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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:27:55+00:00 2026-06-10T14:27:55+00:00

My script takes a json call, splits it up, puts those values into an

  • 0

My script takes a json call, splits it up, puts those values into an array and then counts down the array through a for loop, adding one value to a <li> element per loop. They each appear listed, but without any of jquery mobile’s style. Here is how it looks now;

Without style

by specifying the exact class of styled lists into the for loop, I was able to make it appear like this

enter image description here\

however, that is also not ideal, as I can’t add a count bubble at the end, or a checkbox, for example.
is there a better way to do this? here is my current code

console.log('findById: ');
    $.ajax({
        type: 'GET',
        url: 'http://172.16.200.61:8080/RESTfulExample/blacksheep/api/getgroup',
        dataType: "jsonp",
        success: function(data){
            alert('findById success:' + data.groups);
            var json = data.groups;
            var jsplit=json.split(",");
            console.log(jsplit);
            Fill(jsplit);           
        },
        error : function (jqXHR, textStatus, errorThrown) {
         alert(textStatus);
         alert(errorThrown);
        },
    });

function Fill(input){
    for (i=0 ; i < input.length ; i++){
        document.getElementById("people").innerHTML += "<li>" + input[i] +  "</li>";        
    }
}
  • 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-10T14:27:57+00:00Added an answer on June 10, 2026 at 2:27 pm

    In JQuery Mobile, for elements that are injected dynamically to the page there is a need to run the appropriate method to apply JQM’s styling, in your case:

    $('#mylist').listview();

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

Sidebar

Related Questions

I have a jquery auto complete script that takes a JSON array and displays
I have a Perl script that takes text values from a MySQL table and
I have the following python script which takes some inputs and puts them in
I am making a cross-domain JSON(P) call by using JavaScript to add a <script>
I have a script that takes an uploaded text file, parses it and then
So I have this script that takes a bunch of json files and sends
I have an ajax call to one php script via jquery but it takes
<?php // Execute a shell script $dump = shell_exec('bigfile.sh'); // This script takes some
I have a script that takes a while. I'd like to display a page
write a script that takes two optional boolean arguments,--verbose‚ and ‚--live, and two required

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.