Reply to Re: how to show "browse for folder" dialog in html/javascript?

Your name:

Reply:


Posted by Jonathan N. Little on 10/02/05 18:28

Randy Webb wrote:
<snip>
>> Well yes if the client has JavaScript disabled! ;-)
>
>
> It wouldn't work even with Javascript enabled.
>

Firstly, I am not saying the OP should do this, I think it is a bad
idea. However are you saying that you cannot build a file list of local
files using JavaScript and the file input? Because this simple codes
builds such a list....

<code>
<form>
<textarea name='abc' rows=30 cols=50></textarea>
<input type=file onchange="this.form.abc.value+=';' + this.value; return
true;">
</form>
</code>


>> 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.
>

Now JavaScript cannot be used to upload files, but the list sent to a
server-side script could use the list a as a queue, right? Am I
mistaken? Again, I do not think this is a very good idea...purely
curiosity and a 'what if' question.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация