SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2004
    Location
    Temecula, CA
    Posts
    188
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reference to the IFrame Document

    I know that IFrames are deprecated but I've got good reason for using one. I need to cover some Selects in a form when I display some help text. In FF it's not a problem but in IE the Selects show through, hence the IFrame.

    So, here's the problem: I would like to reference the IFrame itself in the document that it contains. Any reference to document.whatever is bound by the document contained within the IFrame. I need to get at the containing document so that I can get at the IFrame from within the IFrame.

    Anyone been there and done that?


    Further explanation for the hopelessly curious:
    This page show a series of choices for the visitor. Each choice is made using a select element, and there are lots of them. If the visitor has a question about the nature of the choice to be made they click on the item label and a window pops up with additional information.

    The source of this additional information is my client. I will provide them with a page that will accept their Word generated html, clean up the smart quotes and weird dashes and whatever, name it correctly and store it in the correct folder.

    Then, when my php builds the page, it will look for additional information files and when it finds one it will include a link that will stuff the IFrame with the appropriate information and display it in the appropriate location.

    All of the above is both fine and dandy. But here's the rub, I would like the visitor to be able to click on a close button within the IFrame (it would set display to none). Only that button doesn't know where or what the IFrame is!

  2. #2
    SitePoint Zealot
    Join Date
    Jan 2004
    Location
    Temecula, CA
    Posts
    188
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've just found one solution / work-around for this problem. Although I've not answered my question, I've found that enclosing the IFrame in a div and placing the close button in the div just below the IFrame allows me to effect the same, or very similar, result.

    If anyone would like to answer the original question, that would be great, but it's no longer the matter of urgency that it was.

    Thanks.


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
  •