Morning
I am creating an add page for a database in which a user can select which image code to assign to a new product, as a little extra I have created an image gallery below it so the user knows which Image they want to assign. This was working fine in a form select tag but I have had to edit it so the select tag now reads all the images in the folder using
ASP. Any help appreciated, code below
Quote:
<head>
<script language="javascript">
function showimage()
{
if (!document.images)
return
document.images.pictures.src=
document.form1.picture.options[document.form1.picture.selectedIndex].value
}
//-->
</script>
</head>
<body>
<form name="form1">
<select name="picture" id="picture" onChange="showimage()">
<option value=""
<%
Set Objekt=Server.CreateObject("Scripting.FileSystemOb ject")
Set Folder=Objekt.GetFolder(Server.MapPath("images/"))
FOR EACH sak in Folder.Files
if sak.Name="list.asp" then
end if
%>
<option>
<%=sak.Name%><%
NEXT
%>
</option>
</select>
<br /><p align="center"><img src="me.gif" name="pictures" width="99"
height="100">
</form>
|