I have a javascript function that should set an image as the source. It works fine when used to change the image, but now does not come up right for the first image. basically, I show gallery of pictures, then when one is clicked, the frame gets replaced by full size of selected image. there is then 'next' and 'previous' links to switch full size image. the first image does not show, and properties of image box shows it as 'javascript:chgImg(0)'. It used to work, but I am assuming there's a slight change in way IE7 works and now it has problem.
the url selected when small image is clicked is:
framepages/pictureframe.ht
m?starting
point=0
(and if they pick the second photo, startingpoint=1, etc)
I want to know how to get the default set correctly.
pictureframe.htm looks like:
<html>
<head>
<meta http-equiv="Content-Langua
ge" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.
Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Previous</title>
<script type="text/javascript" language="JavaScript"><!--
Hide It:
NewImg = new Array (
"../jpegs/raptureofthedeep
/saintecla
ire.jpg",
"../jpegs/raptureofthedeep
/bluescar.
jpg",
"../jpegs/raptureofthedeep
/alaska.jp
g",
"../jpegs/raptureofthedeep
/oceana.jp
g",
"../jpegs/raptureofthedeep
/tempest.j
pg",
"../jpegs/raptureofthedeep
/moonlake.
jpg",
"../jpegs/raptureofthedeep
/ceruleani
.jpg",
"../jpegs/raptureofthedeep
/ceruleani
i.jpg",
"../jpegs/raptureofthedeep
/ceruleani
ii.jpg"
);
query = '' + this.location;
qu = parseInt(query.substring((
query.inde
xOf('=')) + 1));
var ImgNum = qu;
var ImgLength = NewImg.length - 1;
function chgImg(direction) {
if (document.images) {
ImgNum = ImgNum + direction;
if (ImgNum > ImgLength) {
ImgNum = 0;
}
if (ImgNum < 0) {
ImgNum = ImgLength;
}
document.slideshow.src = NewImg[ImgNum];
}
}
// End --></script>
<style href>a {text-decoration: none} </style>
</head>
<body topmargin="0" leftmargin="0" bottommargin="0" rightmargin="0" marginheight="0" marginwidth="0" bgcolor="#42556B" text="#000000" link="#E4E5E8" vlink="#E4E5E8" alink="#E4E5E8">
<p></p>
<div align="center">
<table align="center" border="0" cellpadding="0" cellspacing="5" height="586" width="100%">
<tr>
<td align="center" colspan="4" valign="absmiddle" width="100%" height="15">
</td>
</tr>
<tr>
<td align="center" valign="absmiddle" width="10%" rowspan="7"> </td>
<td align="center" colspan="2" valign="absmiddle" width="33%" height="505" rowspan="7">
<a target="_self" href="../refugeslideshow.h
tm">
<img src="javascript:chgImg(0)"
name="slideshow" alt="Refuge Paintings" align="center" valign="center" border="0" width="502" height="500"></a></td>
<td align="center" valign="absmiddle" width="10%"> </td>
</tr>
<tr>
<td align="center" valign="absmiddle" width="10%">
<a href="javascript:chgImg(-1
)"><font face="Verdana" size="2">Previous</font></
a></td>
</tr>
<tr>
<td align="center" valign="absmiddle" width="10%">
<a href="javascript:chgImg(1)
"><font face="Verdana" size="2">Next</font></a></
td>
</tr>
<tr>
<td align="center" valign="absmiddle" width="10%">
<font face="Verdana" size="2">
<a target="_self" href="../raptureofthedeeps
lideshow.h
tm">Back</
a></font><
/td>
</tr>
<tr>
<td align="center" valign="absmiddle" width="10%"> </td>
</tr>
<tr>
<td align="center" valign="absmiddle" width="10%"> </td>
</tr>
<tr>
<td align="center" valign="absmiddle" width="10%"> </td>
</tr>
<tr>
<th valign="middle" width="50%" height="20" colspan="2"> </th>
<th valign="middle" width="50%" height="20" colspan="2"> </th>
</tr>
<tr>
<th valign="middle" colspan="4" height="21" width="100%"> </th>
</tr>
</table>
</div>
</body>
</html>
Start Free Trial