#1
  1. a lazy guy
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    Hong Kong
    Posts
    99
    Rep Power
    14

    Javascript: Frames question


    Hi Guyz,

    In a browser screen, there are two frames. They named 'Frame_A' and 'Frame_B'.

    In 'Frame_A', it opened a popup window named 'Frame_C'.

    Now, in Frame_C, I'd like to click a icon and open a link in Frame_B.

    How can it be done?

    I tried


    window.opener.Frame_B.location.href = "xxx" seems does not work.

    Any solution?
  2. #2
  3. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    25
    Don't know, too tired, been up all night... but how about calling a function:

    onClick="opener.sendB('location.html')"

    function sendB(location) {
    parent.frame_B.location.href = location
    }
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2001
    Posts
    765
    Rep Power
    14
    opener.top.Frame_B.location = 'url'

    Why are you calling a popup 'Frame_C'? If it's because 'Frame_C' is actually another frame inside the popup, use:

    top.opener.top.Frame_B.location = 'url'

IMN logo majestic logo threadwatch logo seochat tools logo