FileExists - Populate a Combo Box

Results 1 to 3 of 3

Thread: FileExists - Populate a Combo Box

  1. #1
    Jason Guest

    Default FileExists - Populate a Combo Box

    Hi<BR><BR>I need to check a folder and see if there are any (.pdf files) in the folder. If there is I need to populate a combo box that will contain links to these individual files. Does anyone have ideas/code on how to accomplish this. I am relativly new and this is quite a task for me. I don&#039t want to hard code,it must be done dynamically. Thanks for the help.<BR><BR>Jason

  2. #2
    Join Date
    Dec 1969

    Default RE: FileExists - Populate a Combo Box

    Hi,<BR><BR>you have to use javascript to change the page source after a selection has been made from the combo box. to create the combo box options you can use:<BR><BR>Dim fsoObject<BR>Dim fdrObject<BR>Dim filObject<BR><BR>Set fsoObject = Server.CreateObject("Scripting.FileSystemObject")< BR>Set fdrObject = fsoObject.Getfolder("c:DocInfo") &#039folder name<BR><BR>for each filObject in fdrObject.files<BR>if right(,3) = "nfo" then<BR>response.write "&#060;option&#062;" &<BR>end if<BR>next<BR><BR>Set fsoObject = nothing<BR>Set fdrObject = nothing<BR>Set filObject = nothing

  3. #3
    Jason Guest

    Default RE: FileExists - Populate a Combo Box

    Thanks Peter<BR><BR>What does the &#060;option&#062; mean in the response.write line?<BR><BR>Thanks for your insight, I am going to try this

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts