HTML Titles in Frames
-
My website, link in signature, uses a total of 5 frames. When initially loaded up, the
index.html
breaks it into a banner frame up top for a navigation page, and a body frame below for content. All the content pages load up 3 smaller frames, one for a left margin, one a right, and one main content. It sounds complicated but it makes sense to me. Anyways, the title bar across my web browser always reads thetitle
tag fromindex.html
. How can I get it to read thetitle
tag of the page in the lower frame? The question "Do computers think?" is the same as "Can submarines swim?" DragonFire Software Jeryth -
My website, link in signature, uses a total of 5 frames. When initially loaded up, the
index.html
breaks it into a banner frame up top for a navigation page, and a body frame below for content. All the content pages load up 3 smaller frames, one for a left margin, one a right, and one main content. It sounds complicated but it makes sense to me. Anyways, the title bar across my web browser always reads thetitle
tag fromindex.html
. How can I get it to read thetitle
tag of the page in the lower frame? The question "Do computers think?" is the same as "Can submarines swim?" DragonFire Software JerythYou can use JavaScript to access the
title
property of the topmost document (window.top
); set theonLoad
handler of your main document to set the title to the title of the current document (document.title
). Or you could avoid frames :) On my system, your logo takes up nearly half of the screen and I can't easily link to pages inside your site. - Mike -
You can use JavaScript to access the
title
property of the topmost document (window.top
); set theonLoad
handler of your main document to set the title to the title of the current document (document.title
). Or you could avoid frames :) On my system, your logo takes up nearly half of the screen and I can't easily link to pages inside your site. - MikeI know nearly nothing of Javascript. Could you give me a more detailed example or code snippet to work with? As for taking out the frames, I'd love to but the banner at the top reloads every time I go to a new page and I'm not sure how to stop that from happening. I guess I could do the whole thing in Flash, but that will take a little bit to complete. For the logo size, I purposely made it less than 800 pixels wide for anyone out there on 800x600 screens. Get a bigger monitor and resolution :-D The question "Do computers think?" is the same as "Can submarines swim?" DragonFire Software Jeryth
-
I know nearly nothing of Javascript. Could you give me a more detailed example or code snippet to work with? As for taking out the frames, I'd love to but the banner at the top reloads every time I go to a new page and I'm not sure how to stop that from happening. I guess I could do the whole thing in Flash, but that will take a little bit to complete. For the logo size, I purposely made it less than 800 pixels wide for anyone out there on 800x600 screens. Get a bigger monitor and resolution :-D The question "Do computers think?" is the same as "Can submarines swim?" DragonFire Software Jeryth
Add this to the
body
tag in your content frame pages:onload="window.top.document.title = document.title"
This will set the title of the top level document (the frameset page) to the title of the current document. I've thrown together a downloadable example here: http://lugatgt.org/rxtemp/[^] - Mike