Jump to content

layers


rpnbrn

Recommended Posts

I am trying to set something up on my page so that when a link is clicked, an object (swf) or external html source will load on the existing page in a NEW layer. I want something that will load on top of the existing page and can then be closed showing the page that remained behind the temporary new layer. PLEASE HELP!

Link to comment
Share on other sites

I'm trying to do something that would be alternative to a pop-up window. I want a link that, when clicked, when load an object (ie flash video) or iframe source/html page ON TOP of the existing page within a NEW layer. Example would be if I had a navigation menu that would load a new layer containing text links in a sort of sub menu of listed flash videos. When one of the links is activated, a layer atop the page is loaded (100% width/height) of the flash video (from a source such as dailymotion or youtube) that a visitor could watch and then close with the existing page still there behind it. I am trying to do this in a LAYER instead of opening a new browser window. I have seen this done on one site before (but forgot where) and loved the effect. ANY HELP would be greatly appreciated. Thanks!!!

Link to comment
Share on other sites

I'm not too sure because I haven't tried this...but I did read it somewhere :)Something about (in the css) declare multiple layers and set their z-index to like '-5' or just low enough so that it all goes to the back so you can't see it..then where the links are, the one that you wan't to bring the 'layer' to the front, I read something like it's possible to use javascript to change the css of a page..thus changing the css of your 'layer' to make z-index to 3 or whatever you need it to be. Hopefully you get the idea because I'm kinda learning javascript so I can't help you there :)

Link to comment
Share on other sites

I think the askaninja site uses that sort of trick when you play one of their videos.Basically, they add in an element (it could be anything, div, p, span for all it matters), set the width and height to be the browser window, position it absolutely and set the z-index high enough to override everything.Anyhow, this can be done with accessing the DOM with javascript. Tutorial here: http://w3schools.com/htmldom/dom_intro.aspThe best way, if you're using XHTML, is to use the XML DOM: http://www.w3schools.com/dom/dom_element.aspcreateElement and appendChild are so neat.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...