I have this javascript that changes the src attribute of an iframe when I click on a link (placing the id of that link as url.
function changeFrame(newPage){
document.getElementById('myframe').src = newPage;
}
It works fine but in some cases I need you to address a URL with an anchor for example: pagina.html # slider-1
The first time it works well but if I click on another link that goes to the same page with a different anchor, for example: pagina.html # slider-5. It does not refresh it, although iframe's url does change, it still shows the first anchor.
Any ideas so that after assigning the url to the iframe it resfresque?