My site is a css site and I am using 2 javascripts, (matching column heights from killersites.com and a slideshow from codelifter). Both scripts are in a separate .js file and are linked to the page. The slideshow has a body onload function: <body onload="showHot=true;self.
focus()"; > and this is not allowing the match column heights script to work. I have tried adding both js scripts to the onload call, but that stops the slideshow from working correctly and allows the matching columns script to work. I used: <body onload="showHot=true;self.
focus(); matchColumns=function()">.
This was just a guess so I am probably mistaken. The webpage with slideshow is at
www.sharonrieger.com.
Both javascript codes are below:
matchColumns=function(){
var divs,contDivs,maxHeight,di
vHeight,d;
// get all <div> elements in the document
divs=document.getElementsB
yTagName('
div');
contDivs=[];
// initialize maximum height value
maxHeight=0;
// iterate over all <div> elements in the document
for(var i=0;i<divs.length;i++){
// make collection with <div> elements with class attribute 'container'
if(/\bcolumn\b/.test(divs[
i].classNa
me)){
d=divs[i];
contDivs[contDivs.length]=
d;
// determine height for <div> element
if(d.offsetHeight){
divHeight=d.offsetHeight;
}
else if(d.style.pixelHeight){
divHeight=d.style.pixelHei
ght;
}
// calculate maximum height
maxHeight=Math.max(maxHeig
ht,divHeig
ht);
}
}
// assign maximum height value to all of container <div> elements
for(var i=0;i<contDivs.length;i++)
{
contDivs[i].style.height=m
axHeight + "px";
}
}
// Runs the script when page loads
window.onload=function(){
if(document.getElementsByT
agName){
matchColumns();
}
}
__________________________
__________
__________
__________
__
var SlideShowSpeed = 3000;
// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 2;
var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this
var Links = new Array();
var showHot = false; // don't change this
// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines
// starting at the end of the Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!
Picture[1] = '/Images/slide-shows/home/
mens-retre
at.jpg';
Picture[2] = '/Images/slide-shows/home/
webcast.jp
g';
Picture[3] = '/Images/slide-shows/home/
PS.jpg';
Picture[4] = '/Images/slide-shows/home/
junior-pha
risee.jpg'
;
Picture[5] = '/Images/slide-shows/home/
senior-hom
e.jpg';
Picture[6] = '/Images/slide-shows/home/
couple-w-b
ible.jpg';
Picture[7] = '/Images/slide-shows/home/
ABC-skit.j
pg';
Picture[8] = '/Images/slide-shows/home/
give_me_Je
sus.jpg';
Picture[9] = '/Images/slide-shows/home/
puppets.jp
g';
Picture[10] = '/Images/slide-shows/home/
broadcasts
.jpg';
// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!
Caption[1] = "Conferences/Events";
Caption[2] = "Webcasts";
Caption[3] = "Video Clips";
Caption[4] = "Guest Preaching";
Caption[5] = "Community Service";
Caption[6] = "Devotionals";
Caption[7] = "Drama/Comedy";
Caption[8] = "Christian Music";
Caption[9] = "Children/Puppets";
Caption[10] = "Broadcast/Radio";
// Specify the URL
Links[1] = "/HTML/conferences-events.
html";
Links[2] = "/HTML/Multimedia/webcasts
.html";
Links[3] = "/HTML/Multimedia/videos.h
tml";
Links[4] = "/HTML/guest-preaching.htm
l";
Links[5] = "/HTML/community-service.h
tml";
Links[6] = "/HTML/Devotionals/devotio
nals.html"
;
Links[7] = "/HTML/drama.html";
Links[8] = "/HTML/Multimedia/music.ht
ml";
Links[9] = "/HTML/children-entertainm
net.html";
Links[10] = "/HTML/Multimedia/broadcas
ts-Christi
an.html";
// ==========================
==========
=
// Do not edit anything below this line!
// ==========================
==========
=
var tss;
var iss;
var jss = 0;
var pss = Picture.length-1;
var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}
function control(how){
if (showHot){
if (how=="H") jss = 1;
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (jss > (pss)) jss=1;
if (jss < 1) jss = pss;
if (document.all){
document.images.PictureBox
.style.fil
ter="blend
Trans(dura
tion=2)";
document.images.PictureBox
.style.fil
ter="blend
Trans(dura
tion=Cross
FadeDurati
on)";
document.images.PictureBox
.filters.b
lendTrans.
Apply();}
document.images.PictureBox
.src = preLoad[jss].src;
if (document.getElementById) {
document.getElementById("C
aptionBox"
).innerHTM
L= Caption[jss];
document.getElementById("i
mgLink").h
ref= Links[jss];
}
if (document.all) document.images.PictureBox
.filters.b
lendTrans.
Play();
}}
Also, using the forward and backwards button on the slideshow causes the pages to jump depending on your view. I know this is a tough question, and maybe I should ask about the jumping issue in a separate question. But I thought they might be related. If not, I will post them separately.
Thanks for considering my issues.
alabina