January 10, 200917 yr Hi everyone, I'm new here and this is my first post. 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.
January 10, 200917 yr when you say title do you mean <title> as in what you see at the top of your browser or do you mean headings? do you have a link of what you are doing?
January 11, 200917 yr Author when you say title do you mean <title> as in what you see at the top of your browser or do you mean headings? do you have a link of what you are doing? Yes thats what I mean. I have a blog here http://www.you.uk.com.celticwebsolutions.co.uk/blog/ but I want it to show up as being here http://www.you.uk.com/blog.html the blog.html page does not pick the page titles up from the pages that the frameset is showing. The code on the blog.html page is as follows <frameset border="0" frameborder="0" framespacing="0" cols="100%"> <frame src="http://www.you.uk.com.celticwebsolutions.co.uk/blog/"> </frameset> So it doesn't pick up the page titles or the page icon from the site within the frameset. Is it possible to alter anything so that it does?
January 11, 200917 yr In the page inside the frame, some JavaScript on page load should do it. This isn't tested, because I don't work with frames (horrible things), but how about something like: parent.document.title = document.title; EDIT: Actually no, that won't work, because cross-domain scripting is never permitted. Your best option is to switch to a host that actually lets you run the blog on your domain.
January 11, 200917 yr You may be allowed to add the onLoad event to the frame, rather than the script on the page inside the frame. Once the frame is loaded, get the title of that page and insert it into your websites title tag.
January 12, 200917 yr Author You may be allowed to add the onLoad event to the frame, rather than the script on the page inside the frame. Once the frame is loaded, get the title of that page and insert it into your websites title tag. Excuse my ignorance but how exactly would I do that? Could you give me some example code please. Would it update as the page titles changed?
Create an account or sign in to comment