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 7 of 7

Thread: Calling frame

  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do I target a frame?

    I have a 2 page frameset in which frame B needs to call frame A. I am not sure how to call the frame in the script, however.

    I need my javascript to perform like the following html : <a href="top.htm" target="A">Link</a>

    //show results
    //window.opener.location = "top.htm";
    //window.frames.location = "top.htm";

    Any help would be appreciated.
    Last edited by punkdork; 08-01-2002 at 07:05 PM.

  • #2
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I apologize for making a double post. I thought I deleted my first post because it was not worded properly.

    Lack of patience is not my problem today, sir. But thanks for the heads up. Apologies.

  • #3
    Regular Coder
    Join Date
    May 2002
    Location
    Maine, USA
    Posts
    573
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by punkdork
    I apologize for making a double post. I thought I deleted my first post because it was not worded properly.

    Lack of patience is not my problem today, sir. But thanks for the heads up. Apologies.
    No worries, I understand what happened now that you've explained it. Mistakes happen . (I'll delete your previous post for you)
    boxer_1
    CodingForums Moderator
    "How did a fool and his money get together in the first place?"

  • #4
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks!

  • #5
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Try this

    parent.framename.location.href="yourpage.html

  • #6
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Uh, I *think* you need to reference the frames collection so it would be
    Code:
    parent.frames(frameName).location.href
    -or-
    parent.frames.frameName.location.href
    Note: top can and should be substituted for parent if you have multiple, nested framesets (I know you don't here, but just FYI)

  • #7
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, I finally figured it out but thanks for the tip!


  •  

    Posting Permissions

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