wahyeah10
20 Oct 2010, 02:59 AM
hello everyone, please i need help, i am kinda having a problem with the slideshow i made, when the slideshow is offline it works fine, but when it goes online, its kinda slow, that is to say that it does not shows the pictures. then when i waited again for like 15minutes the photos started coming up one by one. but some still did not come. it seems like it having problems loading the photos. please i need help
here is my javascript code.
here is my html
//
<html>
<head>
<title>CAMPUS TOUR ON CHANCELLOR'S DAY</title>
<link rel="stylesheet" href="indexslide2.css" />
<script type="text/javascript" src="indexslide2.js">
</script>
</head>
<body>
<table align="center" bgcolor="#605f64">
<tr>
<td>
<h1><img id="log" src="logo.jpg">Potrait Photo Slideshow<img id="log" src="logo.jpg"</h1>
<img height="640" width="480" src="slideshow2/slideImg0.jpg" alt="UIDB ALBUM" id="slideshow" />
<div id="imgText"> </div>
<center>
<form action="all"/>
<form action="#">
<input type="button" id="prevLink" value="« Previous"/>
<input type="button" id="nextLink" value="Next »"/>
</form>
</center>
</td>
</tr>
</table>
</body>
</html>
//
this is my external java script
//
window.onload = initAll;
var currImg = 0;
var captionText = new Array(
"A cross section of the chairs in the dinning room of the<br/> University",
"A Faculty member leads the procession with the Mase of the<br/> University",
"Consecration at Mass",
"President delivers his key note address 1",
"President delivers his key note address 2",
"Students process to the hall",
"The Chancellor delivers a sermon during the opening mass",
"The Chancellor delivers the opening speech",
"The Chancellor of the University of Buea reads a message from<br/> the Minister of Higher Education",
"The Chancellor processes to the Church",
"The Chancellor receives the Lectionary during mass",
"The Gospel being proclaimed",
"The President of UIDB and the Rector of the Catholic University<br/> of Cameroon, Bamenda in procession for mass",
"The President shows the campus to the Chancellor and former <br/>Minister of Government",
"The President takes an oath of office to the Chancellor, <br/>Mgr. Immanuel Bushu"
)
function initAll() {
document.getElementById("imgText").innerHTML = captionText[0];
document.getElementById("prevLink").onclick = processPrevious;
document.getElementById("nextLink").onclick = processNext;
}
function processPrevious() {
newSlide(-1);
}
function processNext() {
newSlide(1);
}
function newSlide(direction) {
var imgCt = captionText.length;
currImg = currImg + direction;
if (currImg < 0) {
currImg = imgCt-1;
}
if (currImg == imgCt) {
currImg = 0;
}
document.getElementById("slideshow").src = "slideshow2/slideImg" +
currImg + ".jpg";
document.getElementById("imgText").innerHTML = captionText[currImg];
}
//
here is my javascript code.
here is my html
//
<html>
<head>
<title>CAMPUS TOUR ON CHANCELLOR'S DAY</title>
<link rel="stylesheet" href="indexslide2.css" />
<script type="text/javascript" src="indexslide2.js">
</script>
</head>
<body>
<table align="center" bgcolor="#605f64">
<tr>
<td>
<h1><img id="log" src="logo.jpg">Potrait Photo Slideshow<img id="log" src="logo.jpg"</h1>
<img height="640" width="480" src="slideshow2/slideImg0.jpg" alt="UIDB ALBUM" id="slideshow" />
<div id="imgText"> </div>
<center>
<form action="all"/>
<form action="#">
<input type="button" id="prevLink" value="« Previous"/>
<input type="button" id="nextLink" value="Next »"/>
</form>
</center>
</td>
</tr>
</table>
</body>
</html>
//
this is my external java script
//
window.onload = initAll;
var currImg = 0;
var captionText = new Array(
"A cross section of the chairs in the dinning room of the<br/> University",
"A Faculty member leads the procession with the Mase of the<br/> University",
"Consecration at Mass",
"President delivers his key note address 1",
"President delivers his key note address 2",
"Students process to the hall",
"The Chancellor delivers a sermon during the opening mass",
"The Chancellor delivers the opening speech",
"The Chancellor of the University of Buea reads a message from<br/> the Minister of Higher Education",
"The Chancellor processes to the Church",
"The Chancellor receives the Lectionary during mass",
"The Gospel being proclaimed",
"The President of UIDB and the Rector of the Catholic University<br/> of Cameroon, Bamenda in procession for mass",
"The President shows the campus to the Chancellor and former <br/>Minister of Government",
"The President takes an oath of office to the Chancellor, <br/>Mgr. Immanuel Bushu"
)
function initAll() {
document.getElementById("imgText").innerHTML = captionText[0];
document.getElementById("prevLink").onclick = processPrevious;
document.getElementById("nextLink").onclick = processNext;
}
function processPrevious() {
newSlide(-1);
}
function processNext() {
newSlide(1);
}
function newSlide(direction) {
var imgCt = captionText.length;
currImg = currImg + direction;
if (currImg < 0) {
currImg = imgCt-1;
}
if (currImg == imgCt) {
currImg = 0;
}
document.getElementById("slideshow").src = "slideshow2/slideImg" +
currImg + ".jpg";
document.getElementById("imgText").innerHTML = captionText[currImg];
}
//