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 2 of 2
  1. #1
    Box
    Box is offline
    New to the CF scene
    Join Date
    Dec 2004
    Location
    Paris
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Interacting between 2 frames

    Hi all

    I have an HTML document with 2 frames, Frame1 and Frame2.
    In Frame1, I'm trying to build a script which should
    1. retrieve and process the contents of Frame2
    2. display some results in Frame1
    3. set options in a form contained in Frame2 and submit it

    Step 2 is of course no trouble, but I have a major problem with Step 1 and Step 3 : I
    need to be able to retrieve/modify the contents of Frame2 from the script in Frame1. I tried using
    Code:
    parent.document.getElementById("Frame2").contentDocument
    but it does not seem
    to work.

    Any help will be appreciated.
    Box

  • #2
    New Coder
    Join Date
    Sep 2004
    Location
    Brazil
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think you could use that script if you were interacting with <iframe>īs, then you could give your iframe an 'id'. but I think youīre using normal frames; you usually donīt give a normal frame an 'id' or at least you donīt use its 'id' to call it. on your parent page you probably have:
    <frameset cols="whatever...">
    <frame src="..." name="Frame1">
    <frame src="..." name="Frame2">
    </frameset>
    to call Frame2 you should use:

    parent.Frame2.whatever_content_on_frame2

    hope that works.


  •  

    Posting Permissions

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