Hi, thnx everyone for the help.

I finally did an array, with one element per file. on select, i wrote the name 
of the file on it's element in the array.

Later i just check if the element of the array is empty or has a name inside :)

pretty close to the array.push version of the solution, but this way i can 
control more each of the file uploads.

Thnx!



----- Mensaje original ----
De: David Pariente <[EMAIL PROTECTED]>
Para: [email protected]
Enviado: lunes, 9 de junio, 2008 10:56:07
Asunto: Re: [flexcoders] know if .browse() was executed or not


I tryed that before and thought it would work, but it crashes.

Seems there is a "name" property, but if file not browsed, it crashes when 
accessing it :(


----- Mensaje original ----
De: Alberto Brealey-Guzmá n <alberto.brealey@ gmail.com>
Para: [EMAIL PROTECTED] ups.com
Enviado: viernes, 6 de junio, 2008 22:28:53
Asunto: Re: [flexcoders] know if .browse() was executed or not


On Fri, Jun 6, 2008 at 2:26 AM, David Pariente <xxmapachexx@ yahoo.es> wrote:
> i tried this, but crashes when file is not selected:
>
> if (myFileReference. name.length> 0) { myFileReference. upload() }

It raises a runtime error because if you haven't selected a file
fileReference. name is null. you should check for this condition:

if (myFileReference. name && myFileReference. name.length > 0)
myFileReference. upload();

hope this helps,

-- 
Alberto Brealey-Guzmá n

________________________________

Enviado desde Correo Yahoo!
La bandeja de entrada más inteligente.
     


      ______________________________________________ 
Enviado desde Correo Yahoo! La bandeja de entrada más inteligente.

Reply via email to