Results 1 to 2 of 2

Thread: Cannot manipulate object in parent in Firefox

  1. #1
    Join Date
    Jul 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Cannot manipulate object in parent in Firefox

    I have placed an iFrame within a div and need to set the div's style="visiblity: hidden;" from within the iFrame when the user clicks the close button.

    The following javascript works in IE.

    parent.theDiv.style.visibility="hidden"; , how can I get it to work in Firefox??

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It depends upon what 'theDiv' is. If it is the id of the division then:
    Code:
    parent.document.getElementById('theDiv').style.visibility='hidden'
    should work.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •