How to get the Selected tables name or Id

How to get the Selected tables name or Id

support@kosmos.desupport@kosmos.de Posts: 16Questions: 7Answers: 0

I have a function where i pass the variable of a table. Because ihave multiple tables on my Site.

  tabellePlan = $('#tabelle1).DataTable( {..})
   tabelleKosten = $('#tabelle2').DataTable( {..})

tabellePlan.on( 'select', function () {
    updateUeberblick(tabellePlan)
} );

function updateUeberblick(selectedTabelle){
    var selectedId;
            var selected = selectedTabelle.row( { selected: true } ); 
        if ( selected.any() ) { selectedId = selected.data().id;
            //get selectedTablles id   <-----
          switch(id) {
          case x:
                 // code block

    }

or is there a better way to solve this?

Answers

Sign In or Register to comment.