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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:41:11+00:00 2026-05-29T23:41:11+00:00

I am adding rows to a JQ Mobile table based on a JSON string

  • 0

I am adding rows to a JQ Mobile table based on a JSON string that I am getting from the server.

The first time I go to the page after a refresh, none of the styling is added, however everything works fine everytime after that.

Is there a way to refresh/initialize a table as you can for listviews?

The code below is where I am adding the rows:

$.each(result, function() {
    var imgString;

    if(result[i]["status"] == 'Y') {
        imgString = '<img src= images/checkMark.png height=\"40\" width=\"40\" align=\"middle\">';
    } else {
        imgString = '';
    }

    $('#pickupTable > tbody:last').append('<tr><td class=\"tableRow10\">' +  imgString + 
      '<td class=\"tableRow80\"><a><button class=\"selectPickup\" pickupCode = \"'+ 
      result[i]["id"] + '\"> '+ result[i]["address"] +'</button></a></td></tr>');
    i++;
});

$('#pickupTable > tfoot:last').append('<tr><td colspan="5">Total Pick Ups: ' 
  +result.length + '</td></tr>');
  • 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-29T23:41:13+00:00Added an answer on May 29, 2026 at 11:41 pm

    I would suggest you use .trigger(‘create’); and refresh the page, jQM Docs:

    • http://jquerymobile.com/demos/1.0.1/docs/pages/page-scripting.html

    Enhancing new markup
    The page plugin dispatches a pagecreate event, which most widgets use to auto-initialize themselves. As long
    as a widget plugin script is referenced, it will automatically enhance
    any instances of the widgets it finds on the page.

    However, if you generate new markup client-side or load in content via
    Ajax and inject it into a page, you can trigger the create event to
    handle the auto-initialization for all the plugins contained within
    the new markup. This can be triggered on any element (even the page
    div itself), saving you the task of manually initializing each plugin
    (listview button, select, etc.).

    For example, if a block of HTML markup (say a login form) was loaded
    in through Ajax, trigger the create event to automatically transform
    all the widgets it contains (inputs and buttons in this case) into the
    enhanced versions. The code for this scenario would be:

    $( ...new markup that contains widgets... ).appendTo( ".ui-page" ).trigger( "create" );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I' m trying to enable adding/deleting rows to/from table using folowing code: Script: $(document).ready(function()
i have have added rows in tables... but after adding some rows table have
With jquery, I'm dynamically adding rows. To do this, I'm copying the first of
I have a MyISAM table with more than 10^7 rows. When adding data to
I was looking at adding rows dynamically to my HTML table using jQuery with
I am creating a multidimensional array for sections / rows based on json data
I'm dynamically adding rows to a table using jQuery. The table is inside a
I'm dynamically adding rows to an NSTableView. When I issue [table reloadData] I can
I am currently adding rows to a table using the .insertAfter() funciton within my
I have been successful in adding rows and cells to a table when the

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.