Blog - Ajax loaded row details - question
Blog - Ajax loaded row details - question
The latest blog entry stimulated my interest, I currently have a page with 2 datatables, one for orders, a second for order details, which works fine, but I thought using the loaded row as featured in the blog would be a really nice feature.
I have the page working to an extent, and when i expand the row, I am viewing the data object in the console as expected, but the ...loading stays on the page
i have set up a test page as an example http://test2.forthwebsolutions.com/hutch4dmin/orders.php
This question has an accepted answers - jump to answer
Answers
Hi,
You have
div.html( json.html )
in your code, just like in the blog post, but there is nohtml
property in the JSON returned from the server. That means thatdiv.html( undefined )
is called, thereby not setting the HTML.Your JSON is returning an object with
data
,options
andfiles
properties (presumably an Editor script?). You'd need to either have the Javascript build some HTML based on that, or have the server return the HTML you want to use.Allan
Of course, i'm too busy copying and not thinking
i will take the json object and use $.each to loop through the data and build a table or something like that.
This would work great, but for an even better result, do you have any advice on how to incorporate a datatable into the div ?