How to Open Up a ResponsiveModal from Link

How to Open Up a ResponsiveModal from Link

DTDev77DTDev77 Posts: 4Questions: 2Answers: 0

Hello,
I am getting some data from AJAX into my Datatable. I am not really sure if it's the right way to display an JQuery UI Dialog with more Details from the Dataset.

How to open up the JQuery UI Dialog with Details by clicking the .open_btn ?

$(document).ready( function () {
            $('#table1').DataTable(
                {
                    'processing': true,
                    'serverSide': true,
                    'ajax': 'models/processing_returndata1.php',
                    'order': [[1, 'asc']],
                    'language': {
                        'url': '". /* PHP LANGUAGE VAR */ lang('GLOBAL_DATATABLELANGUAGE') ."'
                    },
                    
                    
                    'columnDefs': [{
                        'targets': 2,
                        'render': function ( data, type, row, meta ) {
                            var RCID = row[7];                   
                        return '<a href=\"#\" id=\"opener' + RCID + '\" openid=\"' + RCID + '\" class=\"open_btn\">VIEW</a>';
                        }
                    }],  
                    
                    
                     responsive: {
                        details: {
                            display: $.fn.dataTable.Responsive.display.modal( {
                                header: function ( row ) {
                                    var data = row.data();
                                    return 'Details for '+data[0]+' '+data[1];
                                }
                            } ),
                            renderer: $.fn.dataTable.Responsive.renderer.tableAll()
                        }
                    }, 
                    
                    'rowCallback': function (row, data, index) {
                        $('.action_button', row).on('click', function () { 
                            showModalDialog(this); 
                        });
                    }, 
                    
            }
            );
            
            
        
            
        } );
This discussion has been closed.