I have some javascript code to make a background image move down the page and also perform auto re-direction after 30 seconds. It works only for IE4 (Although the re-direction works ok for NS4 + Opera).
Is there some way to make a moving background for NS4.
I have not used layers as yet and am not familar with them at present. As this is my entry point page I can't really have separate NS and IE pages.
This my code
<SCRIPT LANGUAGE="JavaScript">
<!--
function StartTimer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
closeTime=hours*3600+mins*60+secs;
closeTime+=30;
Timer();
}
function Timer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
curTime=hours*3600+mins*60+secs;
}
function timeLeft(){
Timer();
count = closeTime-curTime;
window.status = "Automatic entry in " + count + " seconds";
}
// -->
</SCRIPT>
<META NAME="distribution" CONTENT="global">
<META NAME="resource-type" CONTENT="document">
</HEAD>
<BODY BACKGROUND="../images/binary2.jpg" BGCOLOR="#000000">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var backgroundOffset = 0;
var bgObject = eval('document.body');
function scrollBG(maxSize) {
backgroundOffset = backgroundOffset + 1;
if (backgroundOffset > maxSize) backgroundOffset = 0;
if(curTime>=closeTime)
location = "pathframe.htm"
else {
timeLeft();
bgObject.style.backgroundPosition = "0 " + backgroundOffset;
}
}
StartTimer();
window.setInterval("scrollBG(130)", 64);
// End -->
</SCRIPT> [sig][/sig]
Is there some way to make a moving background for NS4.
I have not used layers as yet and am not familar with them at present. As this is my entry point page I can't really have separate NS and IE pages.
This my code
<SCRIPT LANGUAGE="JavaScript">
<!--
function StartTimer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
closeTime=hours*3600+mins*60+secs;
closeTime+=30;
Timer();
}
function Timer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
curTime=hours*3600+mins*60+secs;
}
function timeLeft(){
Timer();
count = closeTime-curTime;
window.status = "Automatic entry in " + count + " seconds";
}
// -->
</SCRIPT>
<META NAME="distribution" CONTENT="global">
<META NAME="resource-type" CONTENT="document">
</HEAD>
<BODY BACKGROUND="../images/binary2.jpg" BGCOLOR="#000000">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var backgroundOffset = 0;
var bgObject = eval('document.body');
function scrollBG(maxSize) {
backgroundOffset = backgroundOffset + 1;
if (backgroundOffset > maxSize) backgroundOffset = 0;
if(curTime>=closeTime)
location = "pathframe.htm"
else {
timeLeft();
bgObject.style.backgroundPosition = "0 " + backgroundOffset;
}
}
StartTimer();
window.setInterval("scrollBG(130)", 64);
// End -->
</SCRIPT> [sig][/sig]