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

  • Home
  • SEARCH
  • 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 6968245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:25:38+00:00 2026-05-27T16:25:38+00:00

I’m trying to update an HTML table with new data pulled in via json

  • 0

I’m trying to update an HTML table with new data pulled in via json and using jQote.

I have a fairly simple jqote template:

<script type="text/html" id="template">
    <![CDATA[
        <tr>
            <td><%= this.customer_id %></td>
            <td><%= this.campaign_id %></td>
            <td><%= this.cname %></td>
            <td><%= this.create_date %></td>
            <td><%= this.phone %></td>
            <td><%= this.sname %></td>
            <td><%= this.reminder %></td>
            <td><%= this.appt_date %></td>
            <td><%= this.note %></td>
            <td><%= this.unread %></td>
        </tr>
    ]]>
</script>

And here’s my JSON:

[{
    "customer_id": "2081",
    "campaign_id": "812",
    "cname": "Jeff",
    "create_date": "3 days ",
    "phone": "1111111111",
    "sname": "Massage Appointment",
    "reminder": "0",
    "appt_date": "0",
    "note": "",
    "unread": "2"
}]

And here’s my jQuery:

$.ajax({
    type: 'POST',
    url: 'url/for/json/return',
    dataType: 'text/json',
    data: 'huh',
    success: function(jsondata){
        row = $('#template').jqote(jsondata);
        $('#customers > tbody').html(row); 
    },
 }
});

The ajax request runs fine and jsondata has the proper data stored inside, but my jQote tags are all returning undefined. Does anyone see what I am doing wrong?

  • 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-27T16:25:38+00:00Added an answer on May 27, 2026 at 4:25 pm

    Jeff, the JSON data variable fetched via POST is merely a string. You need to parse it with $.parseJSON prior to handing it over to jQote. Another possibility – as you have already figured out yourself – is to use jQuery’s $.getJSON method which parses the response automatically.

    In case you are making use of jQote2 and jQuery 1.4.1 or above you should rewrite your script like this:

    $.ajax({
        type: 'POST',
        url: 'url/for/json/return',
        dataType: 'text/json',
        data: 'huh',
        success: function(jsondata){
            var data = $.parseJSON(jsondata);
            // Call the "substitute HTML" convenience method
            $('#customers > tbody').jqotesub('#template', data);
        }
    });
    

    For a description of $().jqotesub have a look at the jQote2 reference.

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have thousands of HTML files to process using Groovy/Java and I need to
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to loop through a bunch of documents I have to put
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

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.