Forum Moderators: coopster

Message Too Old, No Replies

Iframe redirection

Open files in same iframe

         

zakatua

11:58 am on Feb 27, 2004 (gmt 0)

10+ Year Member



Hi all!

I have site where main content is shown in an iframe placed in the index. I'd like all files being open in that iframe. Well, I know how to do it: with a javascript that always call the index. The problem is that it obviously always shows the same page in the iframe. So I think I could solve this with php (all pages are .php), but I CAN'T CHANGE URLS, so I don't know how to do it. Any idea?

Thanks in advance and sorry for my poor english!

someguy

2:09 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



you simply give the iframe a name. In your links, specify the iframe name as the target.

<a href="mypagename" target="iframeNameHere">mylink</a>

zakatua

2:22 pm on Feb 27, 2004 (gmt 0)

10+ Year Member



Thanks for your reply someguy, but I'm not a newbie in HTML. You didn't understand me, or I don't speak very well... In fact, I don't speak english very well. What I want to do is this:

I have a frameset.
I open pages in a frame.
But if someone goes to a page, I don't want he/she to see only that page (his is what heppens with search engines results). I want the user to see all the frameset.
I can solve this with javascript.
The problem is that in the frame is always shown the same page (wich is in the frame src= ).

How can I have all page being open in the frameset even if they called individually?

I can do this with PHP: frame src=$url so $url will be that of the page. But I can't modify URLs, so I don`t know how to pass this parameter.

I'm a PHP newbie.

Thanks.

jatar_k

5:35 pm on Feb 27, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I would just use js to reload the frameset. You can also have a text menu in your frame pages so people can find the rest of the site.

I don't understand exactly what you mean by

But I can't modify URLs

I assume you use 1 frameset for the whole site?

If they call the page individually you could pass the pagename to your frameset page using one of the $_SERVER [ca.php.net] vars. Possibly $_SERVER['PHP_SELF'] or even $_SERVER['SCRIPT_FILENAME'].

You can then use the filename to load the proper page into your frameset.

Is that what you mean?