I Want to open datatable's data in a popup
I Want to open datatable's data in a popup
shami
Posts: 5Questions: 3Answers: 0
My Script is this:
<script>
load();
function load(){
$("#lostitem tr").remove();
var row = "<tr><th>Item Name</th><th>Category</th><th>Description</th><th>Operations</th></tr>";
$("#tbheadli").append(row);
$("#lostitem").DataTable({
"ajax":{
"url":"file.php",
"dataSrc":"",
"type":"get",
data:{fn:"lostitm"}
},
"columns":[
{"data": "Item_Name"},
{"data": "category"},
{"data": "Description"},
{
data: null,
className: "center",
render: function ( data, type, row ) {
return '<a href="lostitem.php?resolved='+data.Item_NO+'" class="editor_edit">Resolved</a> / <a href="lostitem.php?delete='+data.Item_NO+'" class="editor_remove">Delete</a>';
}
}
],
select:true,
bDestroy:true,
"fnCreatedRow":function(R,data,index){
var p =data.Item_NO;
$(R).attr('lostitem',p);
}
});
}
$('#lostitem').on('click', 'tr', function () {
var name = $('td', this).eq(1).text();
$('#DescModal').modal("show");
});
</script>
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This discussion has been closed.
Answers
Hi @shami ,
This example comes from a different thread and may be useful.
If not, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
pop which i using
<
div class="modal fade" id="DescModal" role="dialog">
Job Requirements & Description