How to change the below code to display the cell in popup?
How to change the below code to display the cell in popup?
Hai,
I attached my part of code which display the entire row in show and hide format .I need to display each cell and its description in popup .Can anyone remodify this code with to display each cell contents in popup?I tried (cell.data).But its not fine working.
`
print "\n table(\"p28\",data,{title:\"<BR><font size=20><b><center>ss</center></b></font><BR>\",colTitles:header})\n";
print " var otable = \$('#p28-table').DataTable({ \n";
print " retrieve: true, \n";
print " });^M \n";
print "\$(\'#p28-table tbody tr\').on(\'click\', \'td:nth-child(10)\', function (f) {^M \n";
print " var tr = \$(this).closest(\'tr\');^M\n";
print " var row = otable.row(tr);^M \n";
# print "var alert=alert(table.cell(this).data());^M \n";
print "\n var js_hash = { ";
foreach $user (keys %pend_reason_hash) {
$counter=0;
$value="<b>Reasons</b>:<br>";
$value .="$pend_reason_hash{$user}";
print "\"$user\":\"$value\",";
$value="";
}
print "}; \n";
=head
print "\$(\'p28-table tbody tr\').on(\'click\',\'td:nth-child(10)\',function(f){^M \n";
print"var tr=\$(this).cell(\'tr\');^M \n";
print"var row=otable.row(tr);^M \n";
print"\n var js_hash={";
foreach $user (keys %pend_reason_hash)
{
$counter=0;
$value="<b>Reasons</b>:<br>";
$value.="$pend_reason_hash{$user}";
$value="";
}
print "};\n";
=cut
print "var queue_name=\$( this ).parent().children(\"td:nth-child(1)\").text();\n";
print "if(f.handled !== true) \n";
print " { \n";
print " f.handled = true; \n";
print "}\n";
print "var alert=otable.cell(this);\n";
#print "cell.data(alert(table.cell(this).data());\n";
#print "var cell=otable.cell( this ); \n";
print " if (row.child.isShown()) {^M \n";
print "cell.data(\"<img src='../lib/DataTables/examples/resources/details_open.png'>\").draw(); \n";
print"row.child.remove();\n";
#print " row.child.hide();^M \n";
print"row.child.remove();\n";
#print " row.child.hide();^M \n";
print " tr.removeClass(\'shown\');^M \n";
# print " } else {^M \n";
# print "cell.data(\"<img src='../lib/DataTables/examples/resources/details_close.png'>\").draw(); \n";
#print"row.child.remove();\n";
print " row.child(js_hash[queue_name]).show();^M \n";
print " tr.addClass(\'shown\');^M \n";
print " }^M \n";
print " });^M \n";
print "});";
print "</script>";
`