|
Gerard,
Add a hidden field to the form to hold the filename, such as:
input type=file name=”theFile”… input type=hidden name=”fileName”
Then in your form tag add an onSubmit handler that does:
>
When the form is submitted you’ll get a postarg called fileName that has the full path to the file on the client machine. You can parse the filename out of that using the tokenize tag.
Dave
-----Original Message-----
Hello,
I have created an upload function that allow a guest to the site to upload files. I created a 2nd field where the user can name the file being uploaded. A request that has been made is that the user not be obliged to enter a name for the file. Although I have yet to find a tag that will read the name of the file being uploaded, or at the very least the text that appears in the Browse input box, I have seen sites that don't request this information.
One option would be for the function to auto name the file, but I would not have any way of knowing the appropriate extension to assign it (.doc, xls, pdf, etc).
I have been out of the development side of things for the last couple of years, and am doing this as a favour more than anything, therefore am using Tango 2000, which may limit my options.
Thanks,
Gerard ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf |
- Witango-Talk: Upload Function Gerard
- RE: Witango-Talk: Upload Function Tom Ferguson
- RE: Witango-Talk: Upload Function David Shelley
