Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsTake a look at this url in both FIreFox and Internet Explorer
http://www.abdcweb.com/Dem
It is supposed to:
1. Fade background from white to black when the page loads
2. Fade content in after background fade is complete
When the user clicks on a menu link other than our work:
1. Fade content out before exit
2. Fade background to white before exit
3. jump user to other html page
IT WORKS THE WAY IT SHOULD IN EXPLORER! However the background doesn't fade in or out.
The background is associated with the body tag. I get the same issue with www.abdcweb.com. It does not align the <body> tag CSS text-align: center.
What are the best practices to get around this and make these things work in mozilla browsers?
==========================
JAVASCRIPT CODE FILE
==========================
// JavaScript Document
// Created by Alex Banks Development Company
// www.abdcweb.com
//This script initiates colors as white.
red = 255;
green = 255;
blue = 255;
inc = 10;
delay = 30;
ie5 = (document.all && document.getElementById);
ns6 = (!document.all && document.getElementById);
opac = 0;
opac2 = 100;
contentLayer = "ct";
selectedURL = "";
//This Function Fades the Background Color To Black
//Control timeing of fade with the delay value
function FadeBlack()
{
red -= inc;
green -= inc;
blue -= inc;
if (red <= 0)
{
FadeContentIn();
return;
}
document.bgColor = get_hex_color (red, green, blue);
setTimeout ("FadeBlack()", delay);
}
function FadeContentIn() {
if(opac < 100){
opac+=inc;
if(ie5) document.getElementById('c
if(ns6) document.getElementById('c
setTimeout('FadeContentIn(
}
}
function FadeContentOut() {
if(opac2 > 0){
opac2-=inc;
if(ie5) document.getElementById('c
if(ns6) document.getElementById('c
setTimeout('FadeContentOut
} else {
FadeWhite();
}
}
function NavClick(URL) {
selectedURL = URL;
FadeContentOut();
}
//This Function Fades the Background Color To Black
//Control timeing of fade with the delay value
function FadeWhite()
{
red += inc;
green += inc;
blue += inc;
if (red >= 255)
{
GetURL(selectedURL);
return;
}
document.bgColor = get_hex_color (red, green, blue);
setTimeout ("FadeWhite()", delay);
}
function GetURL(URL) {
window.location = URL;
}
//This functino will translate color values to Hexidecimal Format
function get_hex_color (r, g, b)
{
var hexstring = "0123456789abcdef";
var hex_color =
hexstring . charAt (Math . floor (r / 16))
+ hexstring . charAt (r % 16)
+ hexstring . charAt (Math . floor (g / 16))
+ hexstring . charAt (g % 16)
+ hexstring . charAt (Math . floor (b / 16))
+ hexstring . charAt (b % 16);
return hex_color;
}
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: TNamePosted on 2007-12-04 at 22:55:01ID: 20409453
Comments are available to members only. Sign up or Log in to view these comments.