I want to print text from a document identified in a JS function (myText_1.txt below) by transferring it to the <body> section where it will be shown on the website. The text is comments that go with a slide show.
Here is code that I have used in the past to transfer a string. I simply want to replace the string part with the text document. However, what I have tried so far doesn't work.
Anyone out there familiar with this. It should be straight forward but somehow, I'm missing something.
Look at the code near the bottom to see where the myText_1.txt file is introduced.
Thanks
Here is code that I have used in the past to transfer a string. I simply want to replace the string part with the text document. However, what I have tried so far doesn't work.
Anyone out there familiar with this. It should be straight forward but somehow, I'm missing something.
Look at the code near the bottom to see where the myText_1.txt file is introduced.
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"
imageText_3 = "file:///j:/myText_1.txt"
document.photoText=imageText_3
document.getElementById("slideText").innerHTML = document.photoText
document.partnerText="Test2"
document.getElementById("ministryText").innerHTML = document.partnerText
}
//-->
</script>
</html>