title: Shiny datatable with child rows using ajax
body: <p>I'm trying to use datatables library for shiny with more customization.</p>
  
  <p>Here is the example that I'm trying to make.
  <a href="https://datatables.net/examples/api/row_details.html" rel="nofollow">https://datatables.net/examples/api/row_details.html</a>
  Note that I have detail info in different data.frame R variables. like this</p>
  
  <pre><code>A= data.frame(Name = c("Airi Satou", "Angelica Ramos","Paul Byrd")
                 , Position = c("Accountant","Accountant", "CEO")
                 , Office   = c("Tokyo", "Tokyo", "New York"))
  A.detail= data.frame(Name = c("Airi Satou", "Angelica Ramos")
                 , Extension= c("5407c", "8422")
                 , salary   = c(16000, 20000))
  </code></pre>
  
  <p>I don't like to merge two data.frame variables, if it is possible to do this without merge, because of the computation time. Obviously, some of rows may not have any details.</p>
  
  <p>I can select a row in data table and send the line information to R by binding this as input (thanks to <a href="https://github.com/toXXIc/datatables.Selectable/" rel="nofollow">https://github.com/toXXIc/datatables.Selectable/</a>)
  Then I can find details relevant to selected line in R from the second data.frame variable.
  but I don't know how to send this back to show on the html (under the selected row). I already binded the first table as shinyoutput so I;m not sure if I can pass another data to change this output again.</p>
  
  <p>Maybe I should use ajax to request more data when detail button is clicked, but I don't know how to do ajax request in shiny.</p>