cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Re: CForms: Upload Repeater
Date Thu, 26 Oct 2006 14:25:31 GMT

On 26 Oct 2006, at 14:38, Lars Trieloff wrote:

> Hi Jeremy,
>> I have now got AJAX-type submission via IframeIO in Dojo working  
>> for forms that have file-upload controls in them.
> Great.
>> But meanwhile, I am trying to get some sort of Upload Repeater  
>> working and I have several problems ......
>> The usecase is that a user may add a number of file-upload  
>> controls to a repeater, select files for them, then submit them  
>> all in one go.
>> One problem is, that if you have file-upload controls on a form,  
>> that have a file selected, they get submitted when you click on  
>> the repeater's add button, as these action-events submit the whole  
>> form.
> This applies only to non-AJAX forms, I suppose.

No, this happens with Ajax-enabled forms

>> I would like to change this behaviour but do not know if this will  
>> break some other usecases.
> Why do you want to change the behaviour? I think it is the common  
> behaviour in all non-ajax-enabled upload forms, so I don't see the  
> need. In your case you would, prior to uploading get the file names  
> from all upload fields in the repeater that already have a value,  
> store it in a hidden field, clear the original upload field, send  
> it to the server and when the server responds, you will copy the  
> file names from the hidden fields to the upload fields, right? What  
> happens if JS is deactivated?

Tricks like this are not possible (if I understood you right) there  
is no API for setting the value of file-upload controls via  
javascript. It is locked down as a security issue.



View raw message