I've found this approach to work well.
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function ParseFileName()
{
SplitThisStr = document.FORM_NAME.FILENAME.value;
// create array from delimited string
SplitArray = SplitThisStr.split("\\");
// how many items in array
LastIteminArray = SplitArray.length;
// get the file name
JustFileName = SplitArray[LastIteminArray-1];
// set the hidden input value
document.FORM_NAME.JustTheFileName.value = JustFileName;
}
// End -->
</script>
</HEAD>
<form name="FORM_NAME" action="MEWSPLITTEST.cfm" method="post" >
file name<input type="file" name="FILENAME" value="" size="50"
maxlength="50" onChange="ParseFileName()"><br>
<input type="hidden" name="JustTheFileName" value="">
<input type="submit">
</form>
csmith
----- Original Message -----
From: "Ben Johansen" <[EMAIL PROTECTED]>
To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]>
Sent: Friday, September 27, 2002 4:22 PM
Subject: RE: Witango-Talk: 2nd request: file upload, capture name ? ASAP!
> Mange Tak ;-)
>
> Ben Johansen - http://www.pcforge.com
> Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm
> Latest downloads & List Archives @ http://www.witango.ws
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of Beverly Voth
> Sent: Friday, September 27, 2002 12:13 PM
> To: Multiple recipients of list witango-talk
> Subject: RE: Witango-Talk: 2nd request: file upload, capture name ?
> ASAP!
>
> Mais oui! Merci,
> Beverly
>
>
> Hello, Richard Wan! On 9/27/2002 3:07 PM -0400, you wrote in whole or
> part:
> >Just tokenize on the "/" and take the last element
> >
> >-----Original Message-----
> >From: [EMAIL PROTECTED]
> >[mailto:[EMAIL PROTECTED]]On Behalf Of Beverly Voth
> >Sent: Friday, September 27, 2002 2:58 PM
> >To: Multiple recipients of list witango-talk
> >Subject: RE: Witango-Talk: 2nd request: file upload, capture name ?
> >ASAP!
> >
> >
> >Hello, Ben Johansen! On 9/27/2002 11:13 AM -0700, you wrote in whole or
> >part:
> >><SCRIPT language="JavaScript">
> >><!--
> >>function getNames()
> >>{
> >>document.LoadFiles.TextName.value = document.LoadFiles.text.value;
> >>document.LoadFiles.LinkDocName.value =
> document.LoadFiles.linkDoc.value;
> >>return true;
> >>}
> >>-->
> >></SCRIPT>
> >>
> >>Now when you submit the names will be placed in the hidden tags for
> you
> >>to reference.
> >
> >
> >OOPs! this returns the entire path to me. I just need the file names.
> >
> >Thanks,
> >Beverly
> >_______________________________________________________________________
> _
> >TO UNSUBSCRIBE: send a plain text/US ASCII email to
> [EMAIL PROTECTED]
> > with unsubscribe witango-talk in the message body
> >
> >_______________________________________________________________________
> _
> >TO UNSUBSCRIBE: send a plain text/US ASCII email to
> [EMAIL PROTECTED]
> > with unsubscribe witango-talk in the message body
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
> with unsubscribe witango-talk in the message body
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
> with unsubscribe witango-talk in the message body
________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
with unsubscribe witango-talk in the message body