Trying to figure out how to auto-cycle an iFRAME.
Here is the link in question:
http://pushingtheenvelope.ca/new/web.html
Would like to cycle the iFRAME choices.
Got this from experts-exchange.com however:
1. Dreamweaver is not color-coding it correctly after line one so I am thinking there is something wrong with it?
2. I have a rollover javascript in place - am I to place this in a new <script></script> entry or within the other one?
<script type="text/Javascript">
var myFrames = new Array("frame1.html", frame2.html", "etc");
var frameNo = 0; //Frame to start on
var seconds = 5; //Number of seconds between frames
var myCycle; //Do not change
function cycleFrames() {
frameNo++;
if ( frameNo == myFrames.length ) frameNo = 0;
window.open(myFrames[frameNo], "frame_id");
myCycle = setTimeout("cycleFrames()", 1000*seconds);
}
function stopCycle() {
cleartimeout(myCycle);
}
</script>
Thanks. Obviously I know crap when it comes to coding.