tags:

views:

115

answers:

2

I open a page in browser. There is a link where I click, its fade the page, by putting a layer in the Z-index. At the mean time another Pop up window is also open. When I close the pop up window, the browser remain still faded. I can’t disable the z-index layer that I put in the parents window. Enter code is done in Java Script.

A: 

I believe want you want to do is something like this. On your parent window/page:

var fadeIn = function fadeIn() {
    // Code to remove added layer
};

And on your child/popup window/page:

window.onunload = function () {
    window.opener.fadeIn();
}
BStruthers
A: 

Any JavaScript that resides in the parent page can be called by the child. In your child popup your "close' button click event should have an event similar to this:

function closePopup()
{ 
    parent.FadeOut();  // Where fadeOut() is a JS function on the parent page
}


//In the Parent Page
function fadeOut()
{
   document.getElementById('myLayer').zindex = 0; //Or similar 
}
PortageMonkey
Was this what you were looking for in terms of a workable solution?
PortageMonkey