1
I have a table that displays a client list and has a fluff on the side to exclude each customer. I want to make this deletion via ajax, how do I make the line that is the client that was deleted disappear without having to refresh the page?
Note: I am using jQuery Datatable plugin
<table id="appDatatable" class="table table-bordered table-hover">
<tbody>
@foreach($clientes as $cliente)
<tr>
<td>{{ $cliente->email }}</td>
<td>{{ $cliente->telefone }}</td>
<td class="text-center">
...
<a class="btn btn-danger btn-sm" title="Excluir cliente"
onclick="conf('{{ $cliente->id }}');">
<span class="fa fa-close"></span>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
Post the relevant snippets of your code that I can help you solve. But the trick is to perform the line removal action in the successful return of the ajax request
– Leandro Angelo