View Full Version : Javacript Code Help
goyapres
07-10-2011, 07:51 PM
I need help with one website that I am webmaster for. I have a few photo pages and the top menu is in Javascript. Also, I have a photo slide show in Javascript. On the home page, the menu works fine but on the photo pages there is an error due to two functions (I think).
What do I need to do to have the menu work and the slide show?
The code is too long to include below but the website url is:
http://www.assumption.ny.goarch.org/2011MemorialDay.htm
Best viewed in Internet Explorer. Thanks.
Chris
jscheuer1
07-11-2011, 02:51 AM
Find this section (highlighted) in the slideshow script:
. . . fernce=500; // The speed that the autplay speed is changed by
autostart=1;
preloadslides=1;
</SCRIPT><!-- end of configurable script --><!-- plugin scripts --><SCRIPT>
// Random order script
function makeRandom() {
tempimage = new Array();
for(p=0;p<theimage.length;p++){
for(p1=0;p1>-1;p1) {tempNum = Math.floor(Math.random()*theimage.length)
if(!tempimage[tempNum]){tempimage[tempNum]=theimage[p];break}}}
for(p=0;p<theimage.length;p++)theimage[p]=tempimage[p]}
if(randomorder==1)makeRandom()
// Preloader
function preloadSlide() {for(k=0;k<til;k++) {theimage[k][1]=new Image().src=theimage[k][1];}}
// Add extra functions between the {} if you need other functions that require the onload
window.onload=function(){
if(window.preloadslides)preloadSlide();if(window.autostart)slidePlay();}
// NS4 resize handler
window.onresize=function(){
if(document.layers)this.locat . . .
Change it as shown:
. . . fernce=500; // The speed that the autplay speed is changed by
autostart=1;
preloadslides=1;
</SCRIPT><!-- end of configurable script --><!-- plugin scripts --><SCRIPT>
// Random order script
function makeRandom() {
tempimage = new Array();
for(p=0;p<theimage.length;p++){
for(p1=0;p1>-1;p1) {tempNum = Math.floor(Math.random()*theimage.length)
if(!tempimage[tempNum]){tempimage[tempNum]=theimage[p];break}}}
for(p=0;p<theimage.length;p++)theimage[p]=tempimage[p]}
if(randomorder==1)makeRandom()
// Preloader
function preloadSlide() {for(k=0;k<til;k++) {theimage[k][1]=new Image().src=theimage[k][1];}}
// Add extra functions between the {} if you need other functions that require the onload
window.onload=function(){
if(window.preloadslides)preloadSlide();if(window.autostart)slidePlay();
loadFunction();
}
// NS4 resize handler
window.onresize=function(){
if(document.layers)this.location=this.locat . . .
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.