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

--
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to