Help diagnosing why Javascript is not working with Wordpress

I created a Wordpress website with various plugins (twitter feed, share this, facebook like, wp-polls and google maps).
<snip/>

I’m now trying to add a message or image that displays using this code:
(from http://www.dynamicdrive.com/dynamicindex4/flyimage2.htm)


<div id="point1" STYLE="position:absolute;visibility:visible;">
<!--Please delete this table and insert into your html elements-->
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<a href="http://www.dynamicdrive.com">
<img src="../ddaward.gif" width=96 height=60 alt="" border="0">
</a>
</td>
</tr>
<tr>
<td>
<center><a href="http://www.dynamicdrive.com">
<font face="Arial" size="2" color="#0000FF">Dynamic Drive</font>
</a></center>
</td>
</tr>
<tr>
<td>
<center><a href="http://www.dynamicdrive.com/new.htm">
<font face="Arial" size="2" color="#0000FF">What's New</font>
</a></center>
</td>
</tr>
</table>
<!--End of the customizable area, please do not delete div the tag -->
</div>


<script LANGUAGE="JavaScript1.2">

/*
Floating image II (up down)- Bruce Anderson (http://appletlib.tripod.com)
Submitted to Dynamicdrive.com to feature script in archive
Modified by DD for script to function in NS6
For 100's of FREE DHTML scripts, Visit http://www.dynamicdrive.com
*/

var XX=20; // X position of the scrolling objects
var xstep=1;
var delay_time=60;

//Begin of the unchangable area, please do not modify this area
var YY=0;  
var ch=0;
var oh=0;
var yon=0;

var ns4=document.layers?1:0
var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0

if(ie){
YY=document.body.clientHeight;
point1.style.top=YY;
}
else if (ns4){
YY=window.innerHeight;
document.point1.pageY=YY;
document.point1.visibility="hidden";
}
else if (ns6){
YY=window.innerHeight
document.getElementById('point1').style.top=YY
}


function reloc1()
{

if(yon==0){YY=YY-xstep;}
else{YY=YY+xstep;}
if (ie){
ch=document.body.clientHeight;
oh=point1.offsetHeight;
}
else if (ns4){
ch=window.innerHeight;
oh=document.point1.clip.height;
}
else if (ns6){
ch=window.innerHeight
oh=document.getElementById("point1").offsetHeight
}
		
if(YY<0){yon=1;YY=0;}
if(YY>=(ch-oh)){yon=0;YY=(ch-oh);}
if(ie){
point1.style.left=XX;
point1.style.top=YY+document.body.scrollTop;
}
else if (ns4){
document.point1.pageX=XX;
document.point1.pageY=YY+window.pageYOffset;
}
else if (ns6){
document.getElementById("point1").style.left=XX
document.getElementById("point1").style.top=YY+window.pageYOffset
}

}

function onad()
{
if(ns4)
document.point1.visibility="visible";
loopfunc();
}
function loopfunc()
{
reloc1();
setTimeout('loopfunc()',delay_time);
}

if (ie||ns4||ns6)
window.onload=onad

</script>

However, the script is not working. I thought it might be a problem with the multiple onload events (since some plugins use javascript), but disabling them didn’t effect this.

I currently have the code (from above) in my footer.php file, right before the closing body tag. I’ve tried similar Javascript codes as well, and they don’t seem to work. This basic code works though:


<script type="text/javascript">
<!--
document.write("<i>Hello World!</i>");
//-->
</script>

Any thoughts about why this isn’t working would be greatly appreciated.
Thanks.

Hi visua7, welcome to the forums.

First off

<script LANGUAGE="JavaScript1.2">

is your browser using javascript version 1.2?

But I suspect the main problem is the script’s age. Using language= has gone by the wayside and the attribute used now is type=‘text/javascript’

And if that isn’t enough to clue you in as to how old the script is, the fact that its working with Netscape 4 and 6 should be hard to miss.

In any case, I think if you try to find something more recent (plugin, custom jquery?) you should have a lot better luck getting something to work.