timcadieux
Programmer
I'm using the below code to allow my user to browse and pick a new thumbnail. My problem is this is my EDIT page, thus i'm loading the current thumbnail BUT there appears to be no way to fill in the filename in the File type field. I could use a hidden field, but if they do change the thumbnail, how can i capture that new info, could i edit my Jaascript to update 2 fields, the img Src and the Hidden field??
Code:
<script LANGUAGE="javascript">
<!--
// -- DISPLAY A PREVIEW OF A SELECTED IMAGE
function DisplayImage(ImageName,ElementValue){
document.images[ImageName].src=ElementValue;
}
// End -->
</script>
<tr>
<td bgcolor="#CCCCCC"><a class="caption">Thumbnail:</a></td>
<td bgcolor="#CCCCCC">
<input name="thumbnail" type="File" id="thumbnail" size="25" onChange="DisplayImage('thethumb',this.value)"></td>
</tr>
<tr bgcolor="#CCCCCC">
<td> </td>
<td><img src="../Images/6_1/Photo_Essays/<%=Thumbnail %>" name="thethumb" width="210" height="70" id="thethumb" > </td>
</tr>