Click to See Complete Forum and Search --> : revolving images


djguy
05-11-2006, 09:53 AM
:confused: I have written javascript to make 3 images automatically revolve. It works on a blank page, but when I try to insert it into my existing webpage only the first image appears. I have no idea what the problem could be. Please help. Here is the script below:
<HTML>
<HEAD>
<TITLE>Discovering Justice - Test Page</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript" type="text/javascript">
img2 = new Image()
seconds = "2";

function imgOne()
{
document.myimg.src = 'http://discoveringjustice.org/northerntrustlogosmall.gif';
setTimeout("imgTwo()", seconds * 1000);
}
function imgTwo()
{
document.myimg.src = 'http://discoveringjustice.org/news/benefitpics/wilmerhalelogo.gif';
setTimeout("imgThree()", seconds * 1000);
}
function imgThree()
{
document.myimg.src = 'http://discoveringjustice.org/binghamlogosmall.gif';
setTimeout("imgOne()", seconds * 1000);
}
</script>
</head>

<body onload="imgOne();">
<img src="http://discoveringjustice.org/northerntrustlogosmall.gif" name="myimg">
</body>
</head>

That has been inserted in to this script through the file "news_test.html":
<TD COLSPAN=5 valign=top>
<IMG SRC="img/highlights.gif" WIDTH=190 HEIGHT=19>
<!--#include file="news_test.html"-->

</TD>

ChiefNX
05-12-2006, 02:26 AM
This should be in the JavaScript section.

mag6999
06-22-2007, 04:59 AM
domo