rotate image in shared border

M

Me

I have a javascript to rotate images, it works in the main part of the
page. I'd like to place it in the top shared border. I want the shared
border to have on the left a static image (company name and logo) and on
the right, the rotating series of pictures. I thought to add a table to
the top shared border, the static image in one cell, and the rotating
images in the other cell. This is of course not working. The script I
have below requires part in the /head section of the code, part in the
/body section. I believe this is the problem, but can't seem to find
any way to make it work. Any ideas or other code that would work would
be welcome.

This is the code that works in the main part of my pages:
(Head Section)
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
// Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/
gSlideshowInterval = 5;
gNumberOfImages = 6;

gImages = new Array(gNumberOfImages);
gImages[0] = "j0400276.jpg";
gImages[1] = "j0399913.jpg";
gImages[2] = "j0309121.jpg";
gImages[3] = "j0401454.jpg";
gImages[4] = "j0316727.jpg";
gImages[5] = "j0316727.jpg";

function canManipulateImages() {
if (document.images)
return true;
else
return false;
}
function loadSlide(imageURL) {
if (gImageCapableBrowser) {
document.slide.src = imageURL;
return false;
}
else {
return true;
}
}
function nextSlide() {
gCurrentImage = (gCurrentImage + 1) % gNumberOfImages;
loadSlide(gImages[gCurrentImage]);
}
gImageCapableBrowser = canManipulateImages();
gCurrentImage = 0;
setInterval("nextSlide()",gSlideshowInterval * 1000);
// -->
</SCRIPT>
(End Head Section)
(Body Section)
<P ALIGN=right><IMG SRC="trees.jpg" BORDER=0 NAME="slide"></a></P>
(End Body Section)

Thanks!
M
 
T

Thomas A. Rowe

You must insert the script between the <body>....script ... </body> tags of the top shared border
page, it can not be in the head section of the page, unless you want to insert it on every page that
will be using the top shared border. You will need to use absolute URL to all images, etc, see
example below:

gImages[0] = "http://www.yourdomainname.com/images/j0400276.jpg";
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
M

MD Websunlimited

Shared border are include files meaning that the script that you have in the head of the shared border file is not inclueded just
the body. Move your script to body section of the shared border file and everything will work.
 

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