Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- formulario.html
- <div class="form-group" id="div-table-pacientes">
- </div>
- paciente.html
- <div class="ocultar" id="html-table-pacientes">
- <table class="table " id="table-pacientes">
- <thead>
- <tr>
- <th>#</th>
- <th>Nombre</th>
- <th>Apellido</th>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- </div>
- pacinete.js
- $("#btn-registrar-tratamiento").on("click", function(){
- $("#div-table-pacientes").html($("#html-table-pacientes").html());
- function cargarTablaPaciente() {
- axios.get("/control/lista_paciente/")
- .then(response => {
- console.log(response.data);
- $("#table-pacientes").DataTable({
- destroy: true,
- pageLength: false,
- data: response.data,
- ordering: false,
- lengthMenu: [ [3, 10, 25, -1], [3, 10, 25, "All"] ],
- //lengthChange: true,
- paging: true,
- columns: [
- { 'data': 'id' },
- { 'data': 'nombres' },
- { 'data': 'apellidos' },
- ]
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement