PDA

View Full Version : talking to frame pages using filters ???


chris_angell
11-19-2002, 07:40 PM
hi, I have this problem.. I am trying to make a division fade from 100 % to 0% that covers the whole screen size, so when people enter my site it fades :) but the problem I am having is I am using frames... I would just make it a single page but it needs frames..


I have managed to get it working on one page, but the problem is now because I want the everything to fade ie the whole screen, it looks out of place when only the main central frame changes ?? does this make scence,, I hope so

so what I am thinking about now is.. in each of the frames pages I have a div that fades out when the function is run ??

ANY HELPERS

here is the code I have so far.....

function blacktowhite()
{
if(document.getElementById("fadeDiv").filters("alpha").opacity > 0)
{
document.getElementById("fadeDiv").filters("alpha").opacity -= 10;
setTimeout("fadeInPage()",100);
}
else
{
document.getElementById('fadeDiv').style.visibility = "hidden";
}
}

how can I tell this code to also fade divisions in other frames, I have about 4 frames pages other the one that is fading at the moment ????????

hmmmmmmmmmmmmmmmmmm another thing is trying to get everything to fade in time ??? but I could deal with that later..

Mr J
11-19-2002, 09:31 PM
You could put a DIV in all the other frames then target them.



function blacktowhite()
{
if(document.getElementById("fadeDiv").filters("alpha").opacity > 0)
{
document.getElementById("fadeDiv").filters("alpha").opacity -= 10;


parent.framename1.document.getElementById("fadeDiv1").filters("alpha").opacity -= 10;
parent.framename2.document.getElementById("fadeDiv2").filters("alpha").opacity -= 10;
parent.framename3.document.getElementById("fadeDiv3").filters("alpha").opacity -= 10;



setTimeout("fadeInPage()",100);
}
else
{
document.getElementById('fadeDiv').style.visibility = "hidden";

parent.framename1.document.getElementById('fadeDiv1').style.visibility = "hidden";
parent.framename2.document.getElementById('fadeDiv2').style.visibility = "hidden";
parent.framename3.document.getElementById('fadeDiv3').style.visibility = "hidden";

}
}