|
Posted by Randy Webb on 10/02/05 17:45
Jonathan N. Little said the following on 10/2/2005 8:27 AM:
> Joakim Braun wrote:
>
>> "Jonathan N. Little" <lws4art@centralva.net> skrev i meddelandet
>> news:fcC%e.273$PA1.41465@monger.newsread.com...
>>
>>> Jukka K. Korpela wrote:
>>>
>>>> strutsng@gmail.com wrote:
>>>>
>>>>> Yes, if I use <input type="file">, I couldn't select a folder as
>>>>> input,
>>
>>
>>
>> <snip>
>>
>>> To OP, You could use the file input field to browse and select each
>>> file, and then use JavaScript to append each section to a list or array.
>>
>>
>>
>> But there would then be no way of uploading the files, right?
>>
>> --
>> Joakim Braun
>>
>>
>
> Well yes if the client has JavaScript disabled! ;-)
It wouldn't work even with Javascript enabled.
> I would think you would need more JavaScript to enter list/array into a
> form input that would be passed to some server-side script to do the
> actual uploading...
If what you are describing is possible in javascript, then anybody could
simply set the value of a hidden field to whatever file they wanted off
your PC and upload it automatically. That is not allowed (and what you
are describing) for that very reason. File inputs are very limited in
javascript context for a reason - security.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
[Back to original message]
|