Results 1 to 3 of 3

Thread: seemingly-dumb question: javascript/collapsible iframe

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

    Default seemingly-dumb question: javascript/collapsible iframe

    hi folks,

    I have a dumb question:

    I'm building a site for a customer who wants an "AOL-style" inline "popup"
    - a hidden iframe object that only appears when a link is clicked to populate it.

    IFrame object:

    <iframe class= "blueTable"
    name= "IFrame1"
    id= "bottomBox"
    style="top: 300px; width: 525px; scroll: auto; height: 0px;" />
    </iframe>

    so far I have been able to rezize the box dynamically with a javascript call OR
    populate it with an external html file, but not both when the link is clicked.

    <a href="faq.html"
    target="bottomBox"
    onclick="javascript:document.frames.setHeight();"/>Frequently_Asked Questions<img src="gr/go_yellow_btn.gif" border=0></a>

    I'm obviously missing something because I'm a server-side (PHP) guy

    any ideas?
    Thanks in advance.
    Wyzyrd
    <}

  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

    Quote Originally Posted by wyzyrd
    Code:
    <a href="faq.html" 
    target="bottomBox" 
    onclick="javascript:document.frames.setHeight();"/>Frequently_Asked Questions<img src="gr/go_yellow_btn.gif" border=0></a>
    Try targeting the iframe by its name:
    Code:
    <a href="faq.html" 
    target="IFrame1" 
    onclick="javascript:document.frames.setHeight();"/>Frequently_Asked Questions<img src="gr/go_yellow_btn.gif" border=0></a>
    This will populate the iframe.
    - John
    ________________________

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

  3. #3
    Join Date
    Apr 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, jscheuer1 - that actually helped a lot

    I gave up on trying to resize the box from a "placeholder-size" to full-size and just wrapped a <div> tag around the whole dang thing and used javascript onClick to show/hide the whole thing.

    the help is much appreciated
    Wyzyrd
    <}

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
  •