Jump to content

Page Title In Frameset?


Podman

Recommended Posts

Is it possible to get a framed page to have the title of the page within it? I'm trying to mask that a blog is on a different server and I've used a framset to do it, all seemed fine untill I realised it didn't have teh page titles that the blog had....Is this possible? or is there another way to do it please?Any help much appreciated.Pod.

Link to comment
Share on other sites

the issue I've got is taht I have a web site, then I have a blog which is stored on another web address. On the first website there's a frame which is on a standard page within teh page, the link frame on taht page makes it show a page from the 2nd website as if it were really on teh first site. The downside of this is teh page title does not show up from teh linked page. Is there a way to make the totle show from the html page within teh framset? I.e. I have a page on www.site1.co.uk that teh html says <frameset border="0" frameborder="0" framespacing="0" cols="100%"> <frame src="http://www.site2.co.uk/blog/"></frameset>I want it to show the page titles from http://www.site2.co.uk/blog/ they altrer as you click through the pages within it.Do I make myself any clearer now?

Link to comment
Share on other sites

Security is very tight in modern browsers. (This does not include IE, which is pretty loose.) I know of no way to access the content of a frame from the parent.The reverse, however, is not true. If you can put javascript in your blog pages, or link to an external script, this simple line will do what you want: parent.document.title = document.title; If not, not.

Link to comment
Share on other sites

Security is very tight in modern browsers. (This does not include IE, which is pretty loose.) I know of no way to access the content of a frame from the parent.The reverse, however, is not true. If you can put javascript in your blog pages, or link to an external script, this simple line will do what you want: parent.document.title = document.title; If not, not.
I can edit the main templates. So I just need to add taht little bit of code into the page and it will hopefully work?
Link to comment
Share on other sites

Heres what the title within the pages is coded as at the moment<title><?php if (is_home () ) { bloginfo('name');} elseif ( is_category() ) { single_cat_title(); echo ' - ' ; bloginfo('name');} elseif (is_single() ) { single_post_title();} elseif (is_page() ) { bloginfo('name'); echo ': '; single_post_title();} else { wp_title('',true);} ?></title>What woudl I alter that to please?

Link to comment
Share on other sites

Nothing. That's PHP, and it runs while the page is being downloaded. It never interacts with the frameset, in other words.What I gave you was javascript, and it can be placed almost anywhere in the document. Usually a script is the last element before the closing </head> tag. If you already have a javascript section, just add it to the top of that. If not, add a script, like this:

<script type="text/javascript">	 parent.document.title = document.title;</script>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...