Jump to content

modal popup fading background


sayedsohail

Recommended Posts

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)'>
....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.