I was searching today for a few hours for an easy solutions, but i did not find it.
I have a table(#example) with data in it and with a link to a page(allinfo.php) where all the data of particular row is shown(they are not all shown in table). Therefore i would like to make this easier for user. I would like that they can click on the link and the dialog window with content from allinfo.php is shown.
my script in :
$(document).ready(function() {
$('#example a').each(function() {
var $dialog = $('<div></div>')
.append($loading.clone());
var $link = $(this).one('click', function() {
$dialog
.load($link.attr('href') + ' #content')
.dialog({
title: $link.attr('title'),
width: 500,
height: 300
});
$link.click(function() {
$dialog.dialog('open');
return false;
});
return false;
});
});
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"bJQueryUI": true,
"sAjaxSource": "url.php",
"fnServerData": fnDataTablesPipeline,
"sPaginationType": "full_numbers",
} );
} );
So, problem is that table is generated in javascript and i cannot add option of dialog window in there. If i write somewhere else on site: all info and click, everything will work.
Only solution that i can see is, with using "onclick" command, but i do not know how to use it?
so in table should be all info
Thank you for your help!