Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82603

Can I make the ID of Edit / Delete button in defaultContent?

$
0
0

I am a newbie in DataTables. Someone help me, please....

I want to make Edit and Delete button in defaultContent that using AJAX process. But the problems is the ID of Edit and Delete button in defaultContent didn't called by using ".click(function { })".

This my javascript.

$(document).ready(function() { $('#hospital').DataTable( { processing: true, serverSide: true, ajax: "server_processing.php", columns: [ { data: "name" }, { data: "location" }, { data: "class" }, { data: null, className: "center", defaultContent: "<button id='edit'>EDIT</button> / <button id='delete'>DELETE</button>" } ] });

$("#edit").click(function(){ ... $.ajax({ ... }); });

$("#delete").click(function(){ ... $.ajax({ ... }); });

Help me please....


Viewing all articles
Browse latest Browse all 82603

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>