Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2012
    Posts
    43
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Add element to the top of all the frames

    My html web page consists of 3 frames. I want to add an overlay element which should cover entire browser window. But when I add an overlay element then it goes on to of current frame only and the other 2 frames are still visible and not covered by the overlay element.

    So basically I want to add the element in DOM in such a way so that it can cover the entire browser window.

    Thanks

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,641
    Thanks
    0
    Thanked 649 Times in 639 Posts
    You can't do an overlay of the entire window if it contains frames unless you hide the frames.

    There are some browsers that will always place frames in front of anything else you add to the page.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,048
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Are you using framesets or iframes?

  • #4
    New Coder
    Join Date
    Jun 2012
    Posts
    43
    Thanks
    15
    Thanked 0 Times in 0 Posts
    Hi After a lot of try I was actually able to make it work.

    Initially I had 3 frames (NOT iFrames) inside HTML and I wanted to put an overlay on top of all these 3 frames. But could not do that.

    So I changed my design little bit. So in my main HTML I have now one iframe with it's source set to html code which loads the same 3 frames as before. Visually ot looks exactly the same but since now I could have access to main window HTML I was able to add div for overlay which went over the iframe and evetually it was on top of all frames under that iframe.

    Very happy it worked at last.


  •  

    Posting Permissions

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