I'm trying to transfer the text in a document which is in a function to the <body> section of the code to be displayed in a slide show. I was able to transfer a string but I want to replace the string with a number of text files (e.g. myText_1.txt to go with the first slide etc.). The code below displays the document location and not the document itself.
The relevant part is near the bottom of the code.
Anyone out there have any ideas? I think it should be straightforward but so far have had no success.
Thanks
The relevant part is near the bottom of the code.
Anyone out there have any ideas? I think it should be straightforward but so far have had no success.
Thanks
Code:
<html>
<head>
<title>none</title>
<script language="JavaScript" type="text/JavaScript">
<!-- Hide from browsers that do not support JavaScript
var timerId = setInterval("timedPhoto()", 2*1000)
last = 4
var viewRandom = 0
var viewCycle = 10
var photoNum = 0
// -->
</script>
</head>
<body bgcolor="#FF9900">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="579" height="158">
<tr>
<td width="373" height="60" bgcolor="#FFFF99">
<p style="margin-left: 9; margin-right: 9" align="center"><br>
<b><font face="Arial" size="5" color="#0000FF">Local</font></b></p>
<p style="margin-left: 9; margin-right: 9">
<font lang="0" face="Arial" size="2" FAMILY="SANSSERIF"> </font></p>
<p style="margin-left: 9; margin-right: 9">
</p>
<p style="margin-left: 9; margin-right: 9">
</p>
<p style="margin-left: 9; margin-right: 9">
</p>
<p style="margin-left: 9; margin-right: 9">
<font face="Arial" size="2">See one of their recent projects in the adjacent
photo display.</font></p>
<p style="margin-left: 9; margin-right: 9" align="center"> </td>
<td width="195" height="158" bgcolor="#FFCC66" rowspan="2">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="88%" height="186">
<tr>
<td width="100%" height="128">
<p align="center">
<img border="2" src="file:///j:/myImage_1.jpg" name="showPhotoRotate" align="center"></td>
</td>
</tr>
<tr>
<td width="100%" height="37"><p align="center"><b><font face="Arial" size="3"> <span id = "slideText"></span></font></b></td>
</tr>
<tr>
<td width="100%" height="21"><p align="center"><b><font face="Arial" size="2"><span id = "ministryText"></span></font></b></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="373" height="70" bgcolor="#FFFF99">
<p style="margin-left: 9; margin-right: 9"> </td>
</tr>
</table>
</body>
<script language="JavaScript" type="text/JavaScript">
<!-- Hide from browsers that do not support JavaScript
function timedPhoto() {
//alert("last = " + last)
if (viewRandom == 1) {
do {
random1Photo = (Math.floor(Math.random() * 10) +1)
//alert("random1Photo Number =" + random1Photo)
}
while(last == random1Photo)
last = random1Photo;
}
else {
//alert("photoNum = " + photoNum);
photoNum++;
if(photoNum == viewCycle){
photoNum = 1;
}
//alert("photoNum = " + photoNum);
random1Photo = photoNum;
imgNumber=random1Photo;
}
//}
document.showPhotoRotate.src = "file:///j:/myImages/image_mod_" + imgNumber + ".jpg"
//THIS IS THE PART THAT DOESN'T WORK
imageText_3 = "file:///j:/myText_1.txt"
document.photoText=imageText_3
document.getElementById("slideText").innerHTML = document.photoText
// THE PART BELOW WORKS
document.partnerText="Test2"
document.getElementById("ministryText").innerHTML = document.partnerText
}
//-->
</script>
</html>