How to go back to ajax table after http redirection?

How to go back to ajax table after http redirection?

aserafinaserafin Posts: 3Questions: 0Answers: 0
edited September 2011 in General
Hi!

Here is the situation:

I have listing of all my clients with ajax data source and pagination. In each row there is a details button that redirects user to the details page of each client. User story looks like this:

- user searches for client named 'Adrian' and goes to the second page of results
- clicks details link of some client and is redirected to another page
- on this page there is 'Back' button that takes user to second page of results of searching 'Adrian'

I'm wonfering if there is a built-in way to achieve this or something similar in Datatables? ( I know I can expand row, I've done it before, but this time there is just too much information to display and it isn't an option)

Thanks in advance

Adrian

Replies

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin
    HI Adrian,

    Would the state saving built into DataTables do for you: http://datatables.net/ref#bStateSave . You can just enable that, then when the back button is pressed it would load the table in its previous state. You might want to adjust the timeout period for how long the state is saved for, so when you next load up the page by entering the page directly it would be "clean" rather than the old state.

    Allan
  • aserafinaserafin Posts: 3Questions: 0Answers: 0
    Thanks, this is exactly what I need :)
This discussion has been closed.