Results 1 to 2 of 2

Thread: How to open iframe src on button click and close

  1. #1
    Join Date
    Jun 2006
    Location
    B'lore
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to open iframe src on button click and close

    Hi,

    I am a newbie at CSS and javascript design.
    I have question on iframe: I want to use iframe to show a presentation(will consist of some linked html files) but that iframe should open only after clicking button, and close after presentation is over.otherwise(when presentation is not showing picture will appear)
    Is it possible to place that iframe over existing div, where I am showing some images? Or is there way to hide that iframe and show onclick of button. I know I will have to use some javascript but i have no clue.
    any help in this matter would be aprreciated.


    thanks,
    Leena

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    While this may be possible, you might want to find a different solution. Having an iframe cover elements of a page is probably possible, but would be limited to certainly new browsers, if not only a few new browsers.

    There are ways to make popups of things in the page, not frame, but divs, etc. Some scripts here on DD will do that.

    In the end, you might just want a popup window; that would be easier and more compatible.

    I'm guessing that you have figured out some way to display the presentation in the iframe, but it might be better to figure out a new way not needing an iframe.

    Someone else can probably tell you the code for the frame, but I just am not sure how easy that will be to make work for enough people.


    Please post a link to the page on your site that contains the problematic script so we can check it out.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •