I need to insert several rows of data into a particular place from the success function of an $.ajax call to a PHP database query.
What follows is the result of a suggestion at StackOverflow and some of my own testing. Currently this only inserts the new table into the space of a single cell immediately after the target row.
What I need to do is insert a row that contains the json data from the php script after the row that has a checkbox with a value set to a specific movie ID.
As I said, the code above inserts a table after the target row, but what gets inserted is just a table, not a table wrapped in a set of <tr><td> tags to work with the "parent" row. You'll see what I mean if you follow the jsFiddle link at the bottom of this post.
The final structure of the row that is to be inserted should look something like this:
I have created a jsFiddle for anyone to take a crack at helping me figure this out. No matter what I've tried, the inserted table 1) Never gets wrapped in the and tags to make it work with the "parent" table, and 2) the inserted table always only gets put in the area of the first cell in the rest of the table.
____________________________________