Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<SELECT> determines folder name

Status
Not open for further replies.

PenguinHead

Programmer
Jan 5, 2007
18
US
I am writing an archiving function that backs up the selected file to a variable folder (2006, 2007...) based on the year the user selects.

The <SELECT> form is located in default.asp and the actual archive function is located in fm_include.asp. fm_include.asp is an included file in default.asp.

My problem is that I can't get the year selected in the form to become the name of the folder to which the archived file should be sent. (It might be totally simple and I've just missed it =)

default.asp code:

<form method="POST" action="fm_include.asp?action=archivefile&path=<%=sPath%>">
<select name="archiveyear" size="1">
<option value="2005">2005</option>
<option value="2006" selected="selected">2006</option>
<option value="2007">2007</option>
</select>
</form>

fm_include.asp code:

sPathArch = sPath & Request.Form("archiveyear")
 
I've never tried something like this but have you tried to response.write out the sPathArch]/b] value to see what it is actually reading?

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
I have tried this and it doesn't seem to be able to pass anything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top