Reply to Re: How to retain user input in a form file field ?

Your name:

Reply:


Posted by Jukka K. Korpela on 06/09/06 21:28

Yohan N. Leder <ynleder@nspark.org> scripsit:

> In my concrete case, user submitted a form containing a file field,
> for preview. This preview is just on browser, nothing is kept on
> server disk. So, from this preview, user can submit for real or be
> back to edit and change his input.

I'm afraid I have bad news. Internet Explorer 7 beta does not let you do
such things. For security reasons, they say, the filename is not even
available to (client-side scripting in) the browser, still less sent to the
server. Unless you can persuade them to change this (I tried a little, in
the microsoft.* newsgroup for IE discussions, in vain), you and many other
people will have to find out something different.

> Actuallu, he has to browse and
> select a new time the file to upload, everytime he go back from
> preview, even if the field he wants to change is not the file one.

Wouldn't the solution be to store the data (contents of the file) on the
server and insert an identifier for it into the form sent back to the user?
The robust way of retaining user input is that the form handler sends a
response page that contains the user input as prefilled values of fields.
For a file, you would have to play with indirection, i.e. an identifier such
as a generated file name (on the server).

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

[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

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