sayedsohail Posted September 8, 2007 Share Posted September 8, 2007 Hi everyone, Can someone advise to fade the parent window the popup window is called and fade out when popup window is closed. Thanks, Link to comment https://forums.phpfreaks.com/topic/68501-modal-popup-fading-background/ Share on other sites More sharing options...
sayedsohail Posted September 9, 2007 Author Share Posted September 9, 2007 I am not sure why the fading is not working in my case. I am trying to fade the parent window onload of popup window. here is the code. <html> <head> <SCRIPT> function BgFade(red1, grn1, blu1, red2,grn2, blu2, steps) { sred = red1; sgrn = grn1; sblu = blu1; ered = red2; egrn = grn2; eblu = blu2; inc = steps; step = 0; RunFader(); } function RunFader() { var epct = step/inc; var spct = 1 - epct; window.opener.document.bgColor = Math.floor(sred * spct + ered * epct)*256*256 + Math.floor(sgrn * spct + egrn * epct)*256 + Math.floor(sblu * spct + eblu * epct); if ( step < inc ) { setTimeout('RunFader()',50); } step++; } </SCRIPT> </head> <body onLoad='BgFade(0x00,0x00,0x00, 0xFF,0xFF,0xFF,10)'> .... Link to comment https://forums.phpfreaks.com/topic/68501-modal-popup-fading-background/#findComment-344714 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.