3

How do I change the URL of the browser with a website using a structure of <frame>. I know the whole point of <frame> is to use embedded frames so that you can't tell where the site is going. In particular, when you click a link, the frame changes, but the URL at the top of the browser says the same thing.

I'm trying to make it so that the browser CHANGES the URL, so the real URL of the main inner frame is shown at all times. How can I do this?

thirtydot
  • 210,355
  • 44
  • 377
  • 337
CodeGuy
  • 26,751
  • 71
  • 191
  • 310

2 Answers2

1

You can't; best bet is to change the fragment with JavaScript, e.g. window.location.hash = 'whatever'.

You will need to use JavaScript to then detect this and modify the frame's src attribute.

alex
  • 438,662
  • 188
  • 837
  • 957
0

Try to use a javascript to change window.location.hash, see this article : http://bytes.com/topic/javascript/answers/170365-change-browser-url-without-navigating-away

or this question How do I, with JavaScript, change the URL in the browser without loading the new page?

Community
  • 1
  • 1