Se puede obtener los datos de la pestaña que se esta viendo

Se puede obtener los datos de la pestaña que se esta viendo

kcordonkcordon Posts: 4Questions: 3Answers: 0

en general esa es mi pregunta quisiera saber si puedo obtener los datos de la pestaña seleccionada para meterlos en un arrar y poder consultar un servicio para que se actualicen sus campos

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,336Questions: 26Answers: 4,951
    Answer ✓

    in general that is my question I would like to know if I can obtain the data of the selected tab to put them in an arrar and be able to consult a service so that its fields are updated

    obtain the data of the selected tab

    With Datatables you can use rows().data() to get the table data.

    put them in an arrar

    Chain toArray(), like this rows().data().toArray(), to get a Javascript array of the data.

    consult a service so that its fields are updated

    You can send the data using jQuery ajax() to the server.

    Kevin

  • kcordonkcordon Posts: 4Questions: 3Answers: 0

    muchas gracias por tu pronta respuesta, pero conseguir todos los datos ya lo hago desde mi database, lo que quiere es saber que datos estan en la pestaña actualmente

  • kthorngrenkthorngren Posts: 21,336Questions: 26Answers: 4,951

    want is to know what data is currently in the tab

    What does the tab contain? If its a datatable then use rows().data(). If its something else then you may be asking on the wrong forum if you aren't using Datatables.

    Kevin

Sign In or Register to comment.