I have a java script that finds a random number, than with that number prints out the picture in that array spot. Here is the code
<script language="JavaScript">
<!-- Hide from old browsers
function random_imglink()
{
var myImages=new Array()
var myComments=new Array()
//specify random images below. You can have as many as you wish
myImages[1]="images/yuma.jpg"
myComments[1]="Sunrise in Yuma, AZ"
myImages[2]="images/odell1.jpg"
myComments[2]="Marlene Kohanes & Husband on Odell Lake"
myImages[3]="images/greghickman.jpg"
myComments[3]="Greg Hickman"
myImages[4]="images/mount_hood.jpg"
myComments[4]="Mount Hood Oregon"
myImages[5]="images/Multnomah_Falls.jpg"
myComments[5]="Multnomah Falls Oregon"
myImages[6]="images/Oregon_Beaches.jpg"
myComments[6]="The Oregon Beaches"
myImages[7]="images/Crater_Lake.jpg"
myComments[7]="Crater Lake at Sunset"
myImages[8]="images/Light_House.jpg"
myComments[8]="Light House on a Oregon Beach"
myImages[9]="images/diamond_falls.gif"
myComments[9]="Diamond Falls Oregon"
myImages[10]="images/silver_falls.gif"
myComments[10]="Silver Creek Falls Oregon"
myImages[11]="images/mt_st_helens.gif"
myComments[11]="Mount Saint Helens Washington"
var ry=Math.floor(Math.random()*myImages.length)
if (ry==0)
ry=1
document.write('<img src="'+myImages[ry]+'" ALIGN=RIGHT alt="'+myComments[ry]+'">');
}
random_imglink()
// -- End Hiding Here -->
</script>
The problem is that in Netscape 4.5, when I do print preview nothing shows, but when I take out the entire Java Script the whole page will print preview and print out fine. Any seggestions?
<script language="JavaScript">
<!-- Hide from old browsers
function random_imglink()
{
var myImages=new Array()
var myComments=new Array()
//specify random images below. You can have as many as you wish
myImages[1]="images/yuma.jpg"
myComments[1]="Sunrise in Yuma, AZ"
myImages[2]="images/odell1.jpg"
myComments[2]="Marlene Kohanes & Husband on Odell Lake"
myImages[3]="images/greghickman.jpg"
myComments[3]="Greg Hickman"
myImages[4]="images/mount_hood.jpg"
myComments[4]="Mount Hood Oregon"
myImages[5]="images/Multnomah_Falls.jpg"
myComments[5]="Multnomah Falls Oregon"
myImages[6]="images/Oregon_Beaches.jpg"
myComments[6]="The Oregon Beaches"
myImages[7]="images/Crater_Lake.jpg"
myComments[7]="Crater Lake at Sunset"
myImages[8]="images/Light_House.jpg"
myComments[8]="Light House on a Oregon Beach"
myImages[9]="images/diamond_falls.gif"
myComments[9]="Diamond Falls Oregon"
myImages[10]="images/silver_falls.gif"
myComments[10]="Silver Creek Falls Oregon"
myImages[11]="images/mt_st_helens.gif"
myComments[11]="Mount Saint Helens Washington"
var ry=Math.floor(Math.random()*myImages.length)
if (ry==0)
ry=1
document.write('<img src="'+myImages[ry]+'" ALIGN=RIGHT alt="'+myComments[ry]+'">');
}
random_imglink()
// -- End Hiding Here -->
</script>
The problem is that in Netscape 4.5, when I do print preview nothing shows, but when I take out the entire Java Script the whole page will print preview and print out fine. Any seggestions?