I have a Slide show which consists of an HTML document and an external javascript file. The slide show is at "
Each week, I feature different slides. Currently, I update the external file with the new files and then update the html document with the beginning slide.
What I want to do is get rid of having to change the beginning slide in the HTML each week. Can I just add a variable to my external file and call for it in my HTML file? Could you help me with the proper script?
The external file is as follows:
myPix = new Array("
adURL = new Array("469882367","469882686"
thisPic = 0
imgCt = myPix.length - 1
function chgSlide(direction) {
if (document.images) {
thisPic = thisPic + direction
if (thisPic > imgCt) {
thisPic = 0
}
if (thisPic < 0) {
thisPic = imgCt
}
document.myPicture.src=
myPix[thisPic]
}
}
function newLocation() {
document.location.href = " + adURL[thisPic]
}
The HTML file text is as follows:
<td Background=" width='298' height='260'><A HREF="javascript:newLocation()"><CENTER>
<!-- ENTER STARTING GALLERY PICTURE -->
<img src=" NAME = "myPicture" width="170" ALT="Click to View Auction"></CENTER></td>
<td width='298'><font face='Times New Roman' color=#000000 size=4><B><CENTER>
<A HREF="javascript:chgSlide(-1)"><< Previous</A>
<A HREF="javascript:chgSlide(1)">Next >></A> </CENTER></B></font></td>
Thanx
Cliff [sig][/sig]
Each week, I feature different slides. Currently, I update the external file with the new files and then update the html document with the beginning slide.
What I want to do is get rid of having to change the beginning slide in the HTML each week. Can I just add a variable to my external file and call for it in my HTML file? Could you help me with the proper script?
The external file is as follows:
myPix = new Array("
adURL = new Array("469882367","469882686"
thisPic = 0
imgCt = myPix.length - 1
function chgSlide(direction) {
if (document.images) {
thisPic = thisPic + direction
if (thisPic > imgCt) {
thisPic = 0
}
if (thisPic < 0) {
thisPic = imgCt
}
document.myPicture.src=
myPix[thisPic]
}
}
function newLocation() {
document.location.href = " + adURL[thisPic]
}
The HTML file text is as follows:
<td Background=" width='298' height='260'><A HREF="javascript:newLocation()"><CENTER>
<!-- ENTER STARTING GALLERY PICTURE -->
<img src=" NAME = "myPicture" width="170" ALT="Click to View Auction"></CENTER></td>
<td width='298'><font face='Times New Roman' color=#000000 size=4><B><CENTER>
<A HREF="javascript:chgSlide(-1)"><< Previous</A>
<A HREF="javascript:chgSlide(1)">Next >></A> </CENTER></B></font></td>
Thanx
Cliff [sig][/sig]