🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #51139

Re: jquery - jak odczytać wszystkie parametry input file?

#51139
From: Sławek
Date: Thu, 12 Jul 2012 07:32
21 lines
1685 bytes
>Tak się nie da. Musisz podpiąć event onchange i potem oczytać dane z 
>obiektu /files/. Np.

>$('input[type="file"].myMulti').bind('change', function(){

  >var filesdata = this.files;

>});

Kurde trochę mi głupio ale jak dostać się do tych danych aby wiedzieć co 
właściwie mam w tym var filesdata?
Znalazłem na necie takie cudu
alert(filesdata.toSource());
ale mi wyświetla
({0:({})})

To co znalazłem to niby taki odpowiednik phpowego print_r


pozdrawiam
Sławek
Technical Details
Message-ID: <jtluov$4rt$1@mx1.internetia.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!opal.futuro.pl!news.internetia.pl!not-for-mail
References: <jtkmav$bhk$1@mx1.internetia.pl> <jtkqen$8kd$1@inews.gazeta.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!opal.futuro.pl!news.internetia.pl!not-for-mail
From: Sławek <atheist72@wp.pl>
Newsgroups: pl.comp.lang.javascript
Subject: Re: jquery - jak odczytać wszystkie parametry input
 file?
Date: Thu, 12 Jul 2012 09:32:39 +0200
Organization: Netia S.A.
Lines: 22
Message-ID: <jtluov$4rt$1@mx1.internetia.pl>
References: <jtkmav$bhk$1@mx1.internetia.pl> <jtkqen$8kd$1@inews.gazeta.pl>
NNTP-Posting-Host: 213-238-98-97.adsl.inetia.pl
Mime-Version: 1.0
X-Trace: mx1.internetia.pl 1342078559 4989 213.238.98.97 (12 Jul 2012 07:35:59 GMT)
X-Complaints-To: abuse@inetia.pl
NNTP-Posting-Date: Thu, 12 Jul 2012 07:35:59 +0000 (UTC)
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308
In-Reply-To: <jtkqen$8kd$1@inews.gazeta.pl>
X-Tech-Contact: usenet@internetia.pl
X-Antivirus-Status: Clean
X-Newsreader: Microsoft Windows Live Mail 15.4.3555.308
Importance: Normal
X-Antivirus: avast! (VPS 120711-2, 2012-07-11), Outbound message
X-Priority: 3
X-Server-Info: http://www.internetia.pl/
X-MSMail-Priority: Normal
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit