R
Rob
Hi everyone.
I have some main pages with an included header.htm page. The header has a
javascript image rotator. I have put the javascript in an external file in
my web called rotator.js - do I need to remove the first line,
<script LANGUAGE="JavaScript">?
I want to call the script from the body onload part in the main pages.
Please help with this statement. I can't get it right.
Also, what goes in the head of the main pages by way of script src= ?
I hope this make sense.
To summarise, I need..........
<body onload=*************> for main pages.
Any script reference in the head of the main pages (=src)
Whether to remove anything from the script itself.
Script below
<script LANGUAGE="JavaScript">
<!-- Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000;
// Duration of crossfade (seconds)
var crossFadeDuration = 5;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'images/BG.jpg'
Pic[1] = 'images/fire_parts.gif'
Pic[2] = 'images/fa_p3.gif'
Pic[3] = 'images/extings_water.gif'
Pic[4] = 'images/exting_blankets.JPG'
Pic[5] = 'images/signs_stacked.jpg'
Pic[6] = 'images/nc_ic600.JPG'
Pic[7] = 'images/nc_ic400.jpg'
Pic[8] = 'images/nc.gif'
// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad = new Image();
preLoad.src = Pic;
}
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
// End -->
</script>
Very many thanks
Rob
I have some main pages with an included header.htm page. The header has a
javascript image rotator. I have put the javascript in an external file in
my web called rotator.js - do I need to remove the first line,
<script LANGUAGE="JavaScript">?
I want to call the script from the body onload part in the main pages.
Please help with this statement. I can't get it right.
Also, what goes in the head of the main pages by way of script src= ?
I hope this make sense.
To summarise, I need..........
<body onload=*************> for main pages.
Any script reference in the head of the main pages (=src)
Whether to remove anything from the script itself.
Script below
<script LANGUAGE="JavaScript">
<!-- Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000;
// Duration of crossfade (seconds)
var crossFadeDuration = 5;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'images/BG.jpg'
Pic[1] = 'images/fire_parts.gif'
Pic[2] = 'images/fa_p3.gif'
Pic[3] = 'images/extings_water.gif'
Pic[4] = 'images/exting_blankets.JPG'
Pic[5] = 'images/signs_stacked.jpg'
Pic[6] = 'images/nc_ic600.JPG'
Pic[7] = 'images/nc_ic400.jpg'
Pic[8] = 'images/nc.gif'
// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad = new Image();
preLoad.src = Pic;
}
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
// End -->
</script>
Very many thanks
Rob