Dear Sirs,
I have some question about animated gif background
in JavaScript.
I have a such code to achive animated gif background:
<STYLE>
BODY {
background-attachment: fixed;
background-position: 0 0;
background-repeat: repeat
</STYLE>
<SCRIPT>
// This SCRIPT block MUST be included after the BODY tag
var timerID
function StopBackground() {
clearTimeout(timerID)
}
function AnimateBackground(hPos,vPos,hInc,vInc,delay) {
if (arguments[5])
document.body.style.backgroundImage = “url(“” + arguments[5] + “”)”
if (arguments[6])
document.body.style.backgroundRepeat = arguments[6]
if (!isNaN(hPos)) {
if ((hInc!=0) && (hPos > 0)) hPos=-100000
hPos+=hInc
}
if (!isNaN(vPos)) {
if ((vInc!=0) && (vPos > 0)) vPos=-100000
vPos+= vInc
}
document.body.style.backgroundPosition= hPos + ” ” + vPos
if (isNaN(hPos)) hPos = “”” + hPos + “””
if (isNaN(vPos)) vPos = “”” + vPos + “””
timerID = setTimeout(“AnimateBackground(“+hPos+”,”+vPos+”,”+hInc+”,”+vInc+”,”+delay+”)”,delay)
}
AnimateBackground(0,”Bottom”,-10,0,50, “clouds.jpg”)
</SCRIPT>
The problem is when on the same page
with animated gif background
I have some link
( <a href = “”></a> )
to some another page.
For example:
<td class=nav_top align=center width=9%>
<a href=”
<img src=”img/icons_gad.gif” border=0 style=’vertical-align:middle’>
<br>
XYZ
</a>
</td>
When I click to the link above, the whole animated background become
just as a simple white background, and doesn’t return to the original state.
Please advice how to achive animated background
by using Javascript without influence on the rest page elements
behaiving.
Here is the page to demonstrate my question:
If you click on the second from the left side
red heart of the menu, the other WebPage opens.
The original page’s background become entire white.
And it seems to try to download the background picture,
but didn;t succeed to do it.
Please advice how to achive the animated background
without having a such influence on the rest web page
behaivor.
Thanks in advance,
Dimi.