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 <[EMAIL PROTECTED]>
Para: [email protected]
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.

Reply via email to