Dave,

Worked great.

Thanks

Steve

-----Original Message-----
From: David Green [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 1:45 PM
To: Multiple recipients of list witango-talk
Subject: Re: Witango-Talk: Selecting files from local work station


Sorry Steve... I should've explained a little more.  To answer your
question, kind of.  P_Image contains the file contents, and HiddenName
holds the entire path to the file on the local machine.  That's why you
need to Tokenize the HiddenName argument.  Keep reading in my previous
post.  It should explain it a little better.

If you need more explanation, just let me know.

Thanks,

Dave Green
[EMAIL PROTECTED]

"Fogelson, Steve" wrote:
> 
> Dave,
> 
> Thanks for the response.
> 
> Does form.HiddenName.value now equal the file name?
> 
> and
> 
> P_Image contain the file contents to use in the File Action?
> 
> Thanks
> 
> Steve
> 
> -----Original Message-----
> From: David Green [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 03, 2002 1:20 PM
> To: Multiple recipients of list witango-talk
> Subject: Re: Witango-Talk: Selecting files from local work station
> 
> Hi Steve,
> 
> I've ran into the same problem before.  I had to use javascript to get
> around it.  On the page with the form, use a hidden input.  When the
> user submits the form, copy the P_Image field to the hidden field.
> Something like this...
> 
> <script language="javascript">
> <!--
> function CopyFileName(form)
> {
>         form.HiddenName.value = form.P_Image.value;
> }
> // -->
> </script>
> 
> <FORM ENCTYPE="multipart/form-data" METHOD="POST"
> ACTION="<@CGI><@APPFILE>?_function=insert&<@UserReferenceArgument>"
> onSubmit="CopyFileName(this)">
> 
> <INPUT TYPE=FILE SIZE=34 NAME="P_Image" ACCEPT="IMAGE/*">
> <INPUT TYPE="HIDDEN" NAME="HiddenName">
> 
> Then before you write the file, you need to <@TOKENIZE> <@ARG
> HiddenName>.  Soemthing like this...
> 
> <@ASSIGN NAME='Name' VALUE='<@TOKENIZE VALUE="<@ARG HiddenName>"
> CHARS="\">' SCOPE='local'>
> 
> Then specify the correct column...
> 
> File name equals: @@local$Name[1,<@NUMCOLS ARRAY="@@local$Name">]
> 
> Hope this helps!
> 
> Dave Green
> [EMAIL PROTECTED]
> 
> "Fogelson, Steve" wrote:
> >
> > I use the following to obtain a file name and contents:
> >
> > <FORM ENCTYPE="multipart/form-data" METHOD="POST"
> > ACTION="<@CGI><@APPFILE>?_function=insert&<@UserReferenceArgument>">
> >
> > <INPUT TYPE=FILE SIZE=34 NAME="P_Image" ACCEPT="IMAGE/*">
> >
> > When I select a file with the "Browse" button it returns the following
to
> > the text box.
> >
> > C:\Documents and Settings\fogelst\My Documents\My
Pictures\andrusia-lg.jpg
> >
> > I try to extract the file name from P_Image, but P_Image contains the
file
> > contents. Bits or bytes or whatever.
> >
> > I want to extract andrusia-lg.jpg. Is there a way to do that?
> >
> > I still want to be able to write the file to the web server with the
> "File"
> > action.
> >
> > Thanks
> >
> > Steve Fogelson
> > Internet Commerce Solutions
> > ________________________________________________________________________
> > 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

Reply via email to