Results 1 to 7 of 7

Thread: Writing to a frame

  1. #1

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650

    Writing to a frame

    I have a window, and its split into two frames. When you click on some text in one frame I want to use the document.write() for the other frame. I know how to make evrything work except for the document.write() part. Anyone know how to do it?

  2. #2
    Lively Member
    Join Date
    Dec 2002
    Location
    southwest pennsylvania
    Posts
    65
    i think this should work, but my brain isnt exactly working right now cuz the snow day thing.

    parent.rightframename.document.write(stuff+to+write)
    if you choose not to decide you still have made a choice!

    RUSH rocks!

  3. #3

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    Didn't work, I used:
    VB Code:
    1. <div onmouseclick="parent.main.document.write("test")">Test</div>

  4. #4
    Lively Member
    Join Date
    Dec 2002
    Location
    southwest pennsylvania
    Posts
    65
    <div onClick="parent.main.document.write(\"test\")">Test</div>
    if you choose not to decide you still have made a choice!

    RUSH rocks!

  5. #5

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    It still doesn't work, I'm using Internet Explorer, would this be a problem.

  6. #6
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Maybe you need to use the frames array? something like
    Code:
    window.frames['frameName'].document.write('Hello');
    You aren't trying to write it after it has loaded a frame have you? I.e. you shouldn't be putting an src attribute for the frame you want to write to.

  7. #7

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    Oh, I was giving the frame a source. Well I will take the source out and test it.

Posting Permissions

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



Click Here to Expand Forum to Full Width