I have two pages, A and B.
On page A I have different buttons. One button is “highlighted”, which one it has to be is done via a ajax post request (mysql)
When I change to page B and go back to page a, the ajax request is not made again.
But I want the buttons to update, so the ajax request should be called again.
You probably do your ajax request in the pageInit event handler, which is only done once for each page. If you want to run your code every time the page is displayed, put it in pageBeforeIn event handler.