Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. HTML Titles in Frames

HTML Titles in Frames

Scheduled Pinned Locked Moved Web Development
questionhtmldatabasecom
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jeryth
    wrote on last edited by
    #1

    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 the title tag from index.html. How can I get it to read the title tag of the page in the lower frame? The question "Do computers think?" is the same as "Can submarines swim?" DragonFire Software Jeryth

    Z 1 Reply Last reply
    0
    • J 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 the title tag from index.html. How can I get it to read the title tag of the page in the lower frame? The question "Do computers think?" is the same as "Can submarines swim?" DragonFire Software Jeryth

      Z Offline
      Z Offline
      ZoogieZork
      wrote on last edited by
      #2

      You can use JavaScript to access the title property of the topmost document (window.top); set the onLoad 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

      J 1 Reply Last reply
      0
      • Z ZoogieZork

        You can use JavaScript to access the title property of the topmost document (window.top); set the onLoad 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

        J Offline
        J Offline
        Jeryth
        wrote on last edited by
        #3

        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

        Z 1 Reply Last reply
        0
        • J 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

          Z Offline
          Z Offline
          ZoogieZork
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups