On Jul 1, 12:53 am, Peter De Berdt <peter.de.be...@pandora.be> wrote:
> On 01 Jul 2010, at 02:49, Pier wrote:
>
> > Hi, I am pretty much new to Prototype, so I apologize if the question
> > is a bit off.
> > I have this form with only one file input element. What I want to do
> > is add a new file input every time a file is selected to upload. Is
> > there a way to do this using Prototype?
>
> Use the click event in tandem with the change event, since file input  
> fields have very weird behavior across browsers. You'll have to keep a  
> record of the previous value though, to see if the value was indeed  
> changed, or if the control was simply clicked. You might be better of  
> just rethinking your strategy and allowing the user themselves to add  
> a new file field via an "Add file" button.
>
> Best regards
>
> Peter De Berdt

Thanks for the reply Peter. Indeed I was thinking about including an
"Add a file".
Something I forgot to mention: the form will we displayed only in
Firefox. Would this make it easier to keep an eye (or an ear) to the
change event on the file input field?


Thanks again


Pier

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to