Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    refering to a frame with nested frames

    Hi There;
    I've created a web page with three frames. A heading frame, a table of contents frame and a main frame.

    _______________
    | Heading Frame |
    |_______________|
    |LHS | MAIN |
    |_____|_________|

    In the contents frame i want to print when the web page was last updated. I couldn't do this so i tried using frontpage to make up a similar (but less complex) example where i try to print to screen the page title of the Main frame. However i can't seem to refer to the Main frame. Or rather, the page title is blank. In the simpler version the heading frame is new_page_2, the content frame(where i try to refer to the main frame) is new_page_4, and the main frame is new_page_3. Any help would be greatly appreciated. Thanks in advance.

    ***** OUTPUT IN new_page_4 **************
    12/09/2004 header New Page 2 ,
    LHS New Page 4 , RHS THE END
    **************************************

    <html>
    <head>
    <title>New Page 1</title>
    </head>

    <frameset rows="124,*">
    <frame name="banner" scrolling="no" noresize target="contents" src="new_page_2.htm">

    <frameset cols="263,*">
    <frame name="contents" target="main" src="new_page_4.htm">
    <frame name="main" src="new_page_3.htm">
    </frameset>

    <noframes>
    <body>
    <p>This page uses frames, but your browser doesn't support them.</p>
    </body>
    </noframes>
    </frameset>
    </html>
    ********************************************
    *********************new_page_1.htm*****************
    <html>
    <head>
    <title>New Page 2</title>
    <base target="contents">
    </head>

    <body>
    </body>
    </html>
    **************************************************

    *******************new_page_4.htm*******************
    <html>
    <head>
    <title>New Page 4</title>
    <base target="main">
    </head>
    <body>
    <SCRIPT LANGUAGE="JavaScript">
    document.writeln(document.fileModifiedDate)
    document.writeln("header " + top.frames[0].document.title + " , ")
    document.writeln("LHS " + top.frames[1].document.title + " , ")
    document.writeln("RHS " + top.frames[2].document.title + " THE END ");
    </SCRIPT>
    </body>
    </html>
    ************************************************
    *******************new_page_3.htm*****************
    <html>
    <head>
    <title>New Page 3</title>
    </head>

    <body>
    </body>
    </html>
    **************************************************

  • #2
    New Coder
    Join Date
    Dec 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try:
    Code:
    top.document.frames[0].document.title

  • #3
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the idea but i have tried that. It gets me the "Heading" frame. I think it's top.frames[2] that i want. Or at least that's the one that is printing blank right now. Any more ideas?

  • #4
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi All;
    I'm still trying to figure out what i'm doing wrong when i try to access the information of the Main frame. Could it be that the LHS or Contents frame is mentioned(created) first in the frameset and so doesn't know the Name of the Main frame? Any suggestions would be really appreciated...(*crickets*)
    Last edited by CmTs; 12-12-2004 at 06:52 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •