Clickable button not Working in server side
Clickable button not Working in server side
Hi,
I am using this great pluging in my project, I have a datatable showing in a Dialog.
My datatable is working fine in server side mode, lunching searchs on each caractere tiped in the search area, and updating the result perfectly.
My first colum containe a buttom and a label, and my goal is to display an alert or dialog showing the line data on each click.
I am able to lunch an empty window alert in static mode by adding this this:
[code]
$('#myTable tbody input').click( function () {
alert(Test!');
} );
[/code]
But this is not working in server side mode, can you help me please?
For information, this is a part in my jsp file:
[code]
var oTable;
$(document).ready(function() {
oTable = $("#myTable").dataTable({
bJQueryUI : true,
sPaginationType : "full_numbers",
iDisplayLength : 8,
"bLengthChange" : false,
"bSort" : false,
"bAutoWidth": false,
"oLanguage" : {
"sUrl" : "resources/language/fr.txt"
},
"bProcessing" : true,
"bServerSide" : true,
cache : false,
"sAjaxSource" : "/App/welcome/search",
"fnServerData" : function(sSource, aoData, fnCallback) {
$.ajax({
"dataType" : 'json',
"type" : "POST",
"url" : sSource,
"data" : aoData,
"success" : fnCallback
});
}
});
$('#myTable tbody input').click( function () {
alert('Test!');
} );
$("#dialog").dialog({
autoOpen : false,
modal : true,
resizable : false,
width : 580,
height : 455,
});
// Link to open the dialog
$("#dialog-link").click(function(event) {
$("#dialog").dialog("open");
event.preventDefault();
});
});
[/code]
Thanks for your help.
I am using this great pluging in my project, I have a datatable showing in a Dialog.
My datatable is working fine in server side mode, lunching searchs on each caractere tiped in the search area, and updating the result perfectly.
My first colum containe a buttom and a label, and my goal is to display an alert or dialog showing the line data on each click.
I am able to lunch an empty window alert in static mode by adding this this:
[code]
$('#myTable tbody input').click( function () {
alert(Test!');
} );
[/code]
But this is not working in server side mode, can you help me please?
For information, this is a part in my jsp file:
[code]
var oTable;
$(document).ready(function() {
oTable = $("#myTable").dataTable({
bJQueryUI : true,
sPaginationType : "full_numbers",
iDisplayLength : 8,
"bLengthChange" : false,
"bSort" : false,
"bAutoWidth": false,
"oLanguage" : {
"sUrl" : "resources/language/fr.txt"
},
"bProcessing" : true,
"bServerSide" : true,
cache : false,
"sAjaxSource" : "/App/welcome/search",
"fnServerData" : function(sSource, aoData, fnCallback) {
$.ajax({
"dataType" : 'json',
"type" : "POST",
"url" : sSource,
"data" : aoData,
"success" : fnCallback
});
}
});
$('#myTable tbody input').click( function () {
alert('Test!');
} );
$("#dialog").dialog({
autoOpen : false,
modal : true,
resizable : false,
width : 580,
height : 455,
});
// Link to open the dialog
$("#dialog-link").click(function(event) {
$("#dialog").dialog("open");
event.preventDefault();
});
});
[/code]
Thanks for your help.
This discussion has been closed.