Use Ancora and refresh the page with Javascript

0

Good morning, I have a html with several tabs, when I do some procedure, I need to refresh the page, when I come back from the upload, I need to go back to the tab where I left.

I added some anchors, like id of my tabs:      <div id="aba1"></div>

Now I would need to go along with the javascript reload of my anchor.

I'm using location.reload() so far, can I use it for this? How can I do it?

    
asked by anonymous 24.03.2015 / 14:39

1 answer

0

And if you use something like this:

window.location.href = "http://www.meusite.com.br/...?aba=01";

You can only change the value of the aba parameter to see which tab should be selected.

Depending on your server-side you can also use the default way:

window.location.href = "http://www.meusite.com.br/...#aba-01";

At the server you should identify which ID is selected and put it as active.

    
24.03.2015 / 15:02