PDA

View Full Version : Problem of Address using iframe



EricaTse
05-26-2008, 03:43 AM
Hi,

I've a problem about the address showing at the address bar.
I used "iframe" to make my website and the address bar only shows the address of the homepage (no matter which page we go to).
Do you know how to make it showing the corresponding address at the address bar?

Thanks a lot!

Erica

Nile
05-26-2008, 04:44 AM
With what you want, there'd be no point of using frames then...

EricaTse
05-26-2008, 08:41 AM
I know ......
It is because it was developed by my colleague...
So, there is no other solution... other than making all over again???

djr33
05-26-2008, 09:17 AM
The address bar displays the URL of the topmost page. That is, the page holding the iframe.

Changing the iframe doesn't change the location of the main page.

You could create a system easily with PHP (or maybe Javascript) that would use a link like "yourpage.php?iframe=somepage.htm" and that WOULD change the whole page, but that would basically defeat the point of the iframe, because it would reload the main page too.

Using javascript and a target (yourpage.htm#details) you could load 'details' into the iframe, but that would require Javascript to be enabled, and also require a good bit of programming.

Anyway, there's no real solution here.

Usually you don't need the url of the iframe, though.