Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

image selection from directory list?

LEGEND ,
Mar 16, 2007 Mar 16, 2007

Copy link to clipboard

Copied

Hi, I'm working with ASP/VBScript.

I'm creating an INSERT form and I'd like to be able to allow people to view
a list of images held in a specific directory on the server. When they
click on the image they want, this pre-fills a form field with the file
name. Is there an extension for this? I'm struggling to find anything that
isn't ASP.NET.

Thanks.
Nath.


TOPICS
Server side applications

Views

204
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 16, 2007 Mar 16, 2007

Copy link to clipboard

Copied

LATEST
Bit of digging around and I've found the following:

<%
Set MyDirectory=Server.CreateObject("Scripting.FileSystemObject")
Set MyFiles=MyDirectory.GetFolder(Server.MapPath("../graphics/tmbs/"))
For each filefound in MyFiles.files
%>

<% =filefound.Name %>
<br />

<% Next %>

This gives me a list of file names within that directory, similar to the
following:
image1.gif
image2.gif
image3.gif

So, I have altered that code further to be:

<%
Set MyDirectory=Server.CreateObject("Scripting.FileSystemObject")
Set MyFiles=MyDirectory.GetFolder(Server.MapPath("../graphics/tmbs/"))
For each filefound in MyFiles.files
%>

<img src="../graphics/tmbs/<% =filefound.Name %>" />
<br />

<% Next %>

...and this is neatly displaying the images in a list. Hurrah!
How would I alter the above code in order to show 3 images in a row though,
like a Horizontal repeat region?

Thanks.
Nath.

"tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote in message
news:ete18c$3br$1@forums.macromedia.com...
> Hi, I'm working with ASP/VBScript.
>
> I'm creating an INSERT form and I'd like to be able to allow people to
> view a list of images held in a specific directory on the server. When
> they click on the image they want, this pre-fills a form field with the
> file name. Is there an extension for this? I'm struggling to find
> anything that isn't ASP.NET.
>
> Thanks.
> Nath.
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines