Not Grabbing Cell Value

Not Grabbing Cell Value

SatanFatalityzSatanFatalityz Posts: 10Questions: 2Answers: 0
edited June 2023 in Free community support

Link to test case:
Debugger code (debug.datatables.net):

        $('#cxlistbl').DataTable({
            ajax: {
                url: 'http://localhost:8081/timescalealpha/src/php/findmastercxlist.php?companyname='+companyname+'&city='+city+'&state='+state+'&zipcode='+zipcode+'&salesperson'+salesperson+'&phone='+phone+'&chkcustomer='+chkcustomer+'&chkleads='+chkleads+'&chkprospects='+chkprospects+'&chkapprovedcx='+chkapprovedcx+'',
                dataSrc: ''
            },
            columns: [
                {data:"companyid"},
                {title:'Company:',data:'company'},
                {title:'City:',data:'city'},
                {title:'State:',data:'state'},
                {title:'Contacted:',data:'lastContacted'},
                {title:'Phone1:',data:'phone1'},
                {title:'Comments:',data:'comments'},
                {title:'Send CX Page',
                    mRender: function (data,type,full){
                        return "<button class='btn btn-danger btn-sm' type='submit' formaction='http://localhost:8081/timescalealpha/index.php?cx&companyid='"+full[0]+">Send</button>";
                    }
                },
                {title:'Send Prod Page',
                    mRender: function(data, type, row, meta){
                        return '<button class="btn btn-danger btn-sm" type="submit" formaction="http://localhost:8081/timescalealpha/index.php?prodsched&companyname=">Send</button>'
                    }
                },
            ],
        });

Error messages shown:
Description of problem:
When I click on the button it doesn't grab value of the cell, am I doing something wrong? Am I close to getting it right? Looking for feedback.

Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

Replies

Sign In or Register to comment.