PDA

View Full Version : Setting the background transparent, then...



xLostSoulx
03-02-2008, 03:58 AM
I was wondering how I can come across setting the background to grey (translucent) when the pop-up dialogue (found here) starts up, and goes away when the "x" is closed.

The dialogue will only open up when the page is loaded, so that's no biggie. You can check out my current page with the pop-up here:

http://hotelmario.net/javascript/

I want the "right" to be opaque a bit. I have also tried this to make the background translucent:


.translucent
{
filter:alpha(opacity=50);
-moz-opacity:0.5;
opacity:0.5;
}

But, to use that I would have to put the whole body into a div or something with the class of translucent, and that still doesn't tell me how to close it and make the translucent go away. I found the script here:

http://www.dynamicdrive.com/dynamicindex11/abox.htm

If you need an example of what I wish of, then I have one ready for posting.

Kind Regards,

xLostSoulx

jscheuer1
03-02-2008, 09:03 AM
http://www.dynamicdrive.com/dynamicindex17/interstitial.htm

xLostSoulx
03-03-2008, 09:08 PM
Okay, thanks! That worked perfectly, except the only problem is that the script will be ran on a page that is inside a iFrame.

The pop-up comes up, except it comes up inside the iFrame, not on the whole page. Is there any way I can still run the script in the iFrame, but having the box go ontop of the PAGE, not the iframe?

Kind Regards.

jscheuer1
03-04-2008, 03:14 AM
The only script that I know of that is capable of doing something like that from within an iframe can be found here:

http://www.dolem.com/lytebox/