I have a website with a DataTable. Following this I create a js event on clicking on a row. The event stores an id corresponding to the clicked row in a variable and following this I posted a message to the shiny-iframe. 
$(document).ready(function() {
    var table = $('#example').DataTable( {
"columnDefs": [
            {
                "targets": [ 0 ],
                "visible": false,
                "searchable": false
            }
            ]
});
    $('#example tbody').on('click', 'tr', function () {
        var data  = table.row( this ).data();
        var table_row_id = data[0];
        var frame = document.getElementById('shiny-iframe');
        frame.contentWindow.postMessage(table_row_id, '*');
    } );
} );
Still I am not sure how to proceed from here. The end result is to have shiny reloading the app in the iframe with as argument the variable stored in table_row_id.
 
    