[thelist] JavaScript fun

Saidi; Marwan msaidi at ced-concord.com
Fri Apr 13 19:08:20 CDT 2001


Happy Friday all!

Here is my deal. I have a form in which users upload files. I have an <input
type="file" name="uploadfile"> field, which must contain the entire path to
the file. I also have an <input type="text" name="filename">, which inserts
the filename only into a database. I need both fields, one with the path and
one with just the filename. Is there any way to do the following:

1. Based on the info in the "uploadfile" field, use JS to strip out the path
info and return only the filename, and

2. Automatically insert the filename into its field?

I know that this is a tall order, and right now I have the user responsible
for entering the filename field manually, but I would love to remove their
error opportunity. Any tips, pointers, or suggestions for a better way to do
this?

TIA
Marwan Saidi
Webmaster
CED - Concord IS
msaidi at ced-concord.com
407.741.8645


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************





More information about the thelist mailing list