cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Wyles <>
Subject Re: AJAX and upload field
Date Tue, 06 Dec 2005 11:51:38 GMT

On 6 Dec 2005, at 12:20, Sylvain Wallez wrote:

> Robin Wyles wrote:
>> Hi All,
>> I noticed that if a form contains a file field then AJAX is 
>> completely disabled for that form. I've patched my cforms.js so that 
>> it disables AJAX only if the file field contains a value. Is this 
>> valid?
> Yes, definitely.

Shall I put the patch on JIRA? It's very small - I attached it to this 

>> On a more general note would it not be possible to check only the 
>> fields which are to be refreshed on that browser update before 
>> deciding whether a full page update is needed, or am I 
>> misunderstanding something?
> Full page reload only occurs when we exit form.showForm(). Other than 
> that, only partial updates are sent back to the browser.

I understand, I think, but in my form it doesn't seem to work that way 
(this is with a file field).

I have something like...

<fd:group id="group1">
		<fd:upload id="upload"/>

<fd:booleanfield id="boolean">
		  // toggle group2 visibility

<fd:group id="group2">
		<fd:field id="field1"/>
		<fd:field id="field10"/>

Using the boolean field to toggle group2 works fine with my patch as 
long as the upload field doesn't have a value. However when it does 
have a value the whole page is refreshed even though only group1 
contains the upload field and it is group2 that is the subject of the 
browser update. Also after toggling the area again after a full page 
refresh I notice that the value is removed from my file field. Is there 
something I missed?



View raw message