| fireman sam 2004-08-10, 11:17 pm |
| Hi
I've just noticed a typo in original mesage so heres the new one.
I've got a short script that takes the file name of a file that has been
uploaded using HTML file upload object and puts it into a HTML text box object.
The script runs fine except that if the file name includes spaces only the part
of the filename up to the first space is put into the text box. ..
Set Upload = Server.CreateObject("Persits.Upload.1")
Count = Upload.Savevirtual(".")
For Each File in Upload.Files
FileName = file.path
Next
aName = Split(FileName,"\")
iCount = UBound(aName)
...
<form name="form1">
<table align="center">
<tr valign="baseline">
<td width="143">Uploaded File Name </td>
<td width="224"> <% response.write aName(iCount)%>
<input name="textfield" type="text" value=<%response.write aName(iCount)%>>
</td>
The first response.write writes the full filename to screen, the second only
writes (or at least the text box only accepts) the file name up to the first
space. eg 'my document.doc' only 'my' appears in the text box. Anyone know
whats happening?
Thanks
|