Tempo fa ho trovato questo script che potrebbe fare al caso tuo:
pagina con il form: get.html
codice:
<html><head>
<title>popup</title>
</head>
<SCRIPT language="Javascript">
function popup(url)
{
Selname = window.open(url,"Ziel","toolbar=0,status=1,menubar=0,scrollbars=0,resizable=1,width=500,height=500")
Selname.focus();
}
</SCRIPT>
<body>
<form name="bild" action="test.htm" method="POST">
<input type=text name="bildname" size="35">
<a href="javascript:onClick=popup('image.asp');">
[img]icon/view.jpg[/img]</a>
</form>
</body>
</html>
pagina di lettura cartella: image.asp
codice:
<%@Language=VBScript%>
<%Option Explicit%>
<html><head>
<title>getimage</title>
</head>
<SCRIPT language="Javascript">
function getname (bildname)
{
window.opener.document.bild.bildname.value +=bildname;
window.close();
}
</SCRIPT>
<body bgcolor="#f0f0f0">
<%
Dim fs,f,name,x,pagesize,currentpage,currentpos,folder,ScriptName,filecount
pagesize=20
currentPage = Request("page")
if currentPage = vbNullString then
currentPage=0
else
currentPage=CLng(currentPage)
end if
currentPos=0
ScriptName = Request.ServerVariables("SCRIPT_NAME")
folder = server.mappath("image/")
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(folder)
set name = f.files
filecount = name.Count
%>
<table width="80%" bgcolor="#000000" cellspacing="0" cellpadding="0" border="0" align="center">
<TR><TD>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<TR><TD bgcolor="#FFFFFF">
<%
For Each x in name
if currentPos>=currentPage*Pagesize then
%>
')">[img]image/<%=x.Name%>[/img]" height="50">
<%
end if
currentPos=currentPos+1
if currentPos>=currentPage*Pagesize+PageSize then
Exit for
End If
Next
%>
</td></TR>
</TABLE>
</td></tr>
</table>
<table border="0" width="80%" align="center">
<tr><td><p align="center">
<%
If Not CurrentPage = 0 Then
Response.Write "Prev | "
Else
Response.Write "Prev | "
End If
If Not filecount = CurrentPos Then
Response.Write "Next"
Else
Response.Write "Next"
End If
%>
</TD></TR>
</table>
</body>
</html>
Dalla riga
folder = server.mappath("image/")
puoi settare il percorso delle immagini
Spero sia quello che volevi.