This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > August 2004 > text box wont accept file names





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author text box wont accept file names
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

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews