Solved

bootstrap-ajax json.html response format

Posted on 2012-12-31
2
782 Views
Last Modified: 2012-12-31
I'm reading eldarion's bootstrap-ajax, and it talks about the json html return to get back that feeds the ajax response:

https://github.com/eldarion/bootstrap-ajax


does anyone have an example of the format for the json.html?  I'm a bit confused on what it's supposed to look like.

Thanks.
0
Comment
Question by:Evan Cutler
2 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 38733929
just : { "html":"yourhtml" }
example for adding a new task here : http://uk013.o1.gondor.io/
{
    "html": "<tr class=\"\">\n    <td>\n        <div class=\"btn-toolbar\">\n            <div class=\"btn-group\">\n                \n                    <a href=\"/tasks/5699/done/\" class=\"btn ajax\" data-method=\"post\" data-refresh=\"#done-count\" data-replace-closest=\"tr\"><i class=\"icon-ok\"></i></a>\n                \n                <a href=\"/tasks/5699/delete/\" class=\"btn ajax\" data-method=\"post\" data-replace-closest=\"tr\" data-refresh=\"#done-count\"><i class=\"icon-trash\"></i></a>\n            </div>\n        </div>\n    </td>\n    <td>\n        <div class=\"task-label\">\n            test\n        </div>\n    </td>\n</tr>"
}

Open in new window

0
 
LVL 9

Author Closing Comment

by:Evan Cutler
ID: 38733967
Thanks much.
A picture is worth a 1000 words
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now