rotating pictures in FP2003

T

threademporium

My website uses the web component ad banner found in FP2002. I know the
problems associated with new computers having the ability to view this today
and I am trying to find a Javascript to replicate some of the capability.

The Javascript below is working for me in that it does what I want but I am
unable to have more tha one set of rotating picture sets on any one page of
my website. as sson as I copy and paste the script into the page code for the
second time both the new and the first rotating picture set stops cycling
through and displats a fixed image.
I am a novice at anything to with web creation and thus far have worked
using design view in FP2003. If you have any advice for me in what I could do
to to fix this I need some idiot proof instructions as in ( open your mouth,
breathe in, count to 2, blow it out again, repeat for the next 75 years)

website
www.habcraft.co.uk

Script I am trying to use

<table width=100%>
<tr>
<td align=center>
<script type=text/javascript>
var current = 0;
var myPics = new Array();
function addPic(_p) {
myPics[myPics.length?myPics.length:0] = new Image();
myPics[myPics.length-1].src=_p; // preload all pics
}

//Add picture URL's here
addPic("images/card-bags.jpg");
addPic("http://www.google.co.uk/images/hp1.gif");
// etc

function checkIt(val) {
current = Math.abs((current+parseInt(val))%myPics.length);
document.myimg.src = myPics[current].src;
}

document.write("<img name=myimg alt='' src='"+myPics[current].src+"'>");
// Change pic every x seconds - (5000 millisecods currently - 5 secs)
var myTimer = setInterval('checkIt(1)',5000); // 5 second interval;
</script>
</td>
</tr>
</table>



Thanks for taking a look at my question
Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top