www.webdeveloper.com
Results 1 to 3 of 3

Thread: show\hide iframe

Hybrid View

  1. #1
    Join Date
    Apr 2013
    Posts
    2

    show\hide iframe

    hi,
    i have an IFRAME and i want to hide the iframe (display) after the user click on him.
    - when user clock on the iframe will hide (dispaly="")..

    i know how to do this in input.. but i cant make the iframe to input.
    thnks a lot..

  2. #2
    Join Date
    Apr 2013
    Posts
    21
    Very complicated problem. I player around in w3schools tryit editor and figured out that you can put a div over the iframe, make it absolutely or relative positioned (I also seted z-index to 2) with width and height set so that they cover the iframe but not the scroll things. This way you can scroll but anywhere on the iframe you click you will active divs onclick event which would set the display property of the iframe.
    Not very simple but it will solve your problem.

  3. #3
    Join Date
    Apr 2013
    Posts
    2
    Quote Originally Posted by zoran404 View Post
    Very complicated problem. I player around in w3schools tryit editor and figured out that you can put a div over the iframe, make it absolutely or relative positioned (I also seted z-index to 2) with width and height set so that they cover the iframe but not the scroll things. This way you can scroll but anywhere on the iframe you click you will active divs onclick event which would set the display property of the iframe.
    Not very simple but it will solve your problem.
    that problem.. i cant make the function onclick in div or iframe ?
    i know if you hide the button with onclick (when you use input):
    Code:
    <input type="button" onclick="this.style.display='none';" value="click me" />

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles