Trying to search in the columns where existis tags DIV
Trying to search in the columns where existis tags DIV
alissonx
Posts: 25Questions: 0Answers: 0
Hi.. I don't know if this is an error...
but in my table(using datatable), I have some buttons when clicked calls div tags where I have actions to 'edit,remove' a record.
but... when I tried to use the search(bFilter:true) input returns nothing. And the "search string" is on the text on the table;
somebody can help me?
but in my table(using datatable), I have some buttons when clicked calls div tags where I have actions to 'edit,remove' a record.
but... when I tried to use the search(bFilter:true) input returns nothing. And the "search string" is on the text on the table;
somebody can help me?
This discussion has been closed.
Replies
inside dataTable, the Search don't work...
Allan
i'm using data table.
on the first column I have the "ID" of ticket.(its a table ticket).
when I use the action "on mouse over".
ex:"#$ticket_id"
on this function i'm passing the ticket_id ... and this function calls one div that to one query to get the data of ticket and shows on div by innerHTML.
but isn't working.. if I remove the div tag. it works
Allan
the function mostraDADOs() shows the div.
i'm using the default filter.
[code]
$(document).ready(function(){
$('#tabelaProtocolos<?=$numeroTabela;?>').dataTable({
"bProcessing": true,
"bSort": false,
"bLengthChange": false,
"bStateSave": false,
"sPaginationType": "full_numbers",
"aoColumns": [{ "sType": "string" },null,null,null,null]
});
});
[/code]
the hyperlink with onmouseover.
[code]
#i$protocolos_codigo
[/code]
[code]
function mostraDados($protocolos_codigo,$Empresa)
{
echo"document.getElementById(\"Div_Flutuante\").innerHTML=$corpo";
echo"document.getElementById(\"Div_Flutuante\").style.display=\"table-row\"";
} [/code]
Allan
1. You have the table cell with mouseover / mouseout
2. The search works okay in DataTables
3. You update the cell with innerHTML
4. The search doesn't work
Is that correct? If so I see what the problem is - you need to use the fnUpdate function ( http://datatables.net/api#fnUpdate ) to update the cell, not innerHTML. The reason for this is that DataTables can't know that you've updated the HTML of the cell when you do it with innerHTML, so it doesn't know the new search value. fnUpdate fixes that.
Allan
http://www.alissongoncalves.com.br/AllanJardine/protocolos.htm
pass mouse over the #356 ticket to see the div... the datatable is desactivated in this example.. only to you see the div..
[code]
its working.. only the search is not... sorry my bad english... i'm braziliam..
I tryed a lot a of times.. to use this div, but really.. the search dont work...
Allan