SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Sep 2003
    Location
    Kingston
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Accessing div in parentWindow

    Hi,

    I have a page with a link and a DIV with visibility=hidden. The target of the link is to a hidden IFRAME. The link executes a script in the hidden IFRAME. When the user clicks the link, I change the DIV's visibility to visible. Depending on a condition in the script executing in the hidden IFRAME, I want to change the DIV's visibility back to hidden. How would I do this?

    I tried
    Code:
    document.parentWindow.all("DIV").style.visibility = "hidden"
    but it didn't work.

  2. #2
    SitePoint Addict
    Join Date
    Sep 2003
    Location
    Kingston
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    window.parent.document.all("DIV").style.visibility = "hidden" ;
    Found the answer after some playing around.


Bookmarks

Posting Permissions

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