0
I have a two-tab structure, and I need to keep the active tab active when updating the page. I thought about making a click function that saves the id of the open tab, but I need to send a request (ajax) from js to Session. You can do it, but I was wondering if there’s a better way to do it.
Hello William, have you produced any code regarding this question? Could you post it?
– Ricardo Rodrigues de Faria
Good afternoon Ricardo. Actually I only had the logic in my head, because in my point of view this my solution would be a "gambiarra". So I wanted to see if anyone who’s been through this comes up with a better solution than mine.
– Guilherme Fonseca
Well, I believe there are other possible solutions, one of them is a cookie, the problem is that it is transmitted to the server at each request, which is probably not desirable. There are still alternatives like Web SQL, but I think it would be a cannon to kill a fly.
– Ricardo Rodrigues de Faria
Have you ever tried changing the url via javascript when the guy clicks on the tab? when he gives the Reload, it will be with the url you changed,
exemplo: seusite.com.br/#tab-pane2
, do something similar in the my website– Jeferson Assis
Guys, I implemented my logic here and it worked. Thanks for the collaboration.
– Guilherme Fonseca