I had written a page in html/js and set up a very simple function to swap the location of a picture between the main location and the thumbnail location.
function changewindow(filename)
{
document.mainwindow.src = filename;
}
<img src="Image/Front.JPG" name="mainwindow" height="300px" width="300px"/>
<a href="javascript:changewindow('Image/Front.JPG')">
<img border="0" src="Image/Front.JPG" width="75" height="75"></a>
I used this code to do the image swapping so when you click on the smaller image it changes its location to the mainwindow image name.
However, I am trying to make this page now based on server data so I am using asp:Image tags now so i can set the location in the page behind. The asp:Image tag has no name attribute, i tried replacing it with the ID and using the getelementID, but that didnt seem to work either. Does anyone know how i would do this?
Ahy help would be appreciated. Thanks!
function changewindow(filename)
{
document.mainwindow.src = filename;
}
<img src="Image/Front.JPG" name="mainwindow" height="300px" width="300px"/>
<a href="javascript:changewindow('Image/Front.JPG')">
<img border="0" src="Image/Front.JPG" width="75" height="75"></a>
I used this code to do the image swapping so when you click on the smaller image it changes its location to the mainwindow image name.
However, I am trying to make this page now based on server data so I am using asp:Image tags now so i can set the location in the page behind. The asp:Image tag has no name attribute, i tried replacing it with the ID and using the getelementID, but that didnt seem to work either. Does anyone know how i would do this?
Ahy help would be appreciated. Thanks!