View Full Version : Have URL reflect what is loaded in iframe?

10-29-2005, 10:41 PM
*delete other post please, didn't make any sense*

Okay, I've seen some examples of being able to click on a link, and have another page load that has an iframe with a specific page inside it.

I've tried it on my site, and it shows on the URL "**.com\foo.html?bar.html"

I want to be able to do this, without having to go to another page. I want to be able to link to an iframe on my homepage, and after someone clicks on the link, it shows it in the url.

For the purpose of users being able to make a certain page with info loaded in iframe as a homepage or a bookmark.



10-29-2005, 10:49 PM
Heres what I'm using now that I found on another page:

I have the javascript:

function getSource()
document.getElementById('iframe').src = ifsrc

And for the link I put "index.html?ifsrc=arts.html" and took off the target part of the link.

Functionally, it works. My URL is: "http://**/index.html?ifsrc=arts.html"

HOWEVER, it still has to reload the entire page to do it. I was hoping that I didn't have to reload the entire page.


10-29-2005, 11:24 PM
You won't be able to do it without reloading the whole page.