thickbox on server side
thickbox on server side
hi all,
i'm newbie in programming, i'm try to call thickbox function but the server side not working, maybe some body can help me to solve this,
[code]
while ( $aRow = mysql_fetch_array( $rResult ) )
{
$row = array();
/* Add the details image at the start of the display array */
$row[] = '';
for ( $i=0 ; $i
[/code]
i'm newbie in programming, i'm try to call thickbox function but the server side not working, maybe some body can help me to solve this,
[code]
while ( $aRow = mysql_fetch_array( $rResult ) )
{
$row = array();
/* Add the details image at the start of the display array */
$row[] = '';
for ( $i=0 ; $i
[/code]
This discussion has been closed.
Replies
to do this, your column definition for "Version" ("Number") on the client side could have an fnRender function that converts the value to the anchor you desire.
then in a callback (fnDrawCallback probably ideal) you call thickbox on the desired selector to attach thickbox's behavior to that link
[code]
$('#yourtable').dataTable( {
"aoColumns": [
{ }, // other columns
{ }, // other columns
{
"sName": "Number",
"fnRender": function (oObj) {
return ""+oObj.aData[oObj.iDataColumn ]+"";
}
}
],
"fnDrawCallback": function() {
$('.thickbox').thickbox(); // or however you attach thickbox
}
});
[/code]
[code]
$(document).ready(function() {
$('#TableIncident').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "150%",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server-side-incident-online.php",
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"bDestroy": true,
"aoColumnDefs": [
{
"sName": "Number",
"fnRender": function ( oObj ) {
return ''+oObj.aData[0]+'';
},
"aTargets": [ 0 ]
},
],
"fnDrawCallback": function() {
$('.thickbox').thickbox(); // or however you attach thickbox
}
} );
[/code]
[code]
$('.thickbox').thickbox();
[/code]
to
[code]
alert( $('.thickbox').length );
[/code]
what do you get? If its "0" then the selector isn't picking up any elements to apply thickbox to.
Allan
also thickbox is no longer supported. http://jquery.com/demo/thickbox/
Personally I prefer fancybox. http://fancybox.net/
[code]$(document).ready(function() {
$('#TableIncident').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "150%",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server-side-incident-online.php",
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"bDestroy": true,
"aoColumnDefs": [
{
"sName": "Number",
"fnRender": function ( oObj ) {
return ''+oObj.aData[0]+'';
},
"aTargets": [ 0 ]
},
],
"fnDrawCallback": function() {
$('.fancybox').fancybox(); // fancybox uses function to attach, which allows you to control when/where to attach fancybox to your link or DOM element
}
} );
[/code]
but before i see ur post i was trying to use popup window, thats working well too like this
[code]
$(document).ready(function() {
$('#Mytable').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server-side.php",
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"bDestroy": true,
"aoColumnDefs": [
{
"sName": "Number",
"fnRender": function ( oObj ) {
return ''+oObj.aData[0]+'';
},
"aTargets": [ 0 ]
},
{ "sName": "field2", "aTargets": [ 1 ] },
{ "sName": "field3", "aTargets": [ 2 ] },
{ "sName": "field4", "aTargets": [ 3 ] },
{ "sName": "field5", "aTargets": [ 4 ] },
{ "sName": "field6", "aTargets": [ 5 ] }
],
} );
[/code]
Thx all for ur help :)