Question
Download file using select list
Can anyone please tell me how I can download a file, by
submitting a form to itself?
I have this code so far but it doesnt work:
<cfset thePath = "c:\inetpub\wwwroot\documents\folder">
<cfdirectory name="docs" action="List" directory="#thePath#" sort="Name ASC">
<form action="docments/folder/#name#" method="post" class="styleform" >
<select name="file" id="file" class="standard" >
<option value="">Choose a file</option>
<option value="">-----------</option>
<cfoutput query="docs">
<option value="#name#">#name#</option>
</cfoutput>
</select>
<input name="submit" type="submit" value="submit" />
</form>
I have this code so far but it doesnt work:
<cfset thePath = "c:\inetpub\wwwroot\documents\folder">
<cfdirectory name="docs" action="List" directory="#thePath#" sort="Name ASC">
<form action="docments/folder/#name#" method="post" class="styleform" >
<select name="file" id="file" class="standard" >
<option value="">Choose a file</option>
<option value="">-----------</option>
<cfoutput query="docs">
<option value="#name#">#name#</option>
</cfoutput>
</select>
<input name="submit" type="submit" value="submit" />
</form>
