Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Screen Field Selected Data Lost When Submit Button clicked and screen error results [RSS Feed]

#1 Jan. 27, 2011 22:30:18

h.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Screen Field Selected Data Lost When Submit Button clicked and screen error results


I have a file upload screen coded and working, whenever I enter all of
the data (original file selected from the browse button; as well as
target file path and name entered in a separate textbox) at one time.
But when I leave the destination file field blank after selecting the
original file an error is returned saying the destination field needs
to be input, however when that error is returned to the screen the
file previously selected using the file field and browse button, is
not being returned with it. Why is my original file being dropped?
Thanks for the help.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 28, 2011 02:40:54

Karen T.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Screen Field Selected Data Lost When Submit Button clicked and screen error results


On Thu, Jan 27, 2011 at 5:30 PM, hank23 <hversem...@stchas.edu> wrote:

> I have a file upload screen coded and working, whenever I enter all of
> the data (original file selected from the browse button; as well as
> target file path and name entered in a separate textbox) at one time.
> But when I leave the destination file field blank after selecting the
> original file an error is returned saying the destination field needs
> to be input, however when that error is returned to the screen the
> file previously selected using the file field and browse button, is
> not being returned with it. Why is my original file being dropped?
>

It's a browser security measure. Browsers will not allow a web-server to
specify an initial value for a file input field, since that could lead to
malicious servers easily tricking people into uploading sensitive
information from their machines.

Karen
--http://tracey.org/kmt/--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 28, 2011 14:39:05

h.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Screen Field Selected Data Lost When Submit Button clicked and screen error results


So in a case like this the value previously selected can't be put back
out to the screen when the errors are displayed, to avoid the user
having to reselect the same file again when he inputs the previously
missing data?

On Jan 27, 8:40 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> On Thu, Jan 27, 2011 at 5:30 PM, hank23 <hversem...@stchas.edu> wrote:
> > I have a file upload screen coded and working, whenever I enter all of
> > the data (original file selected from the browse button; as well as
> > target file path and name entered in a separate textbox) at one time.
> > But when I leave the destination file field blank after selecting the
> > original file an error is returned saying the destination field needs
> > to be input, however when that error is returned to the screen the
> > file previously selected using the file field and browse button, is
> > not being returned with it. Why is my original file being dropped?
>
> It's a browser security measure. Browsers will not allow a web-server to
> specify an initial value for a file input field, since that could lead to
> malicious servers easily tricking people into uploading sensitive
> information from their machines.
>
> Karen
> --http://tracey.org/kmt/--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Screen Field Selected Data Lost When Submit Button clicked and screen error results [RSS Feed]

Board footer

Moderator control

Enjoy the 21st of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support