Hi all,<br><br>Now that I added support for &#39;onchange&#39; within form fields, I am now running into a small problem with submit buttons automatically being disabled when one of these other triggers causes a submit.&nbsp; If you are refreshing the entire form after the submit it isn&#39;t a problem, but if you just want to change a portion of the form that is in its own region then the disabled button does not become re-enabled.&nbsp; Here is simple example:
<br><br><span style="font-family: courier new,monospace;">*FORM START*</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
&nbsp; *Action1Field1*</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; *Action1Field2*</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp; *RegionA START*</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *Action2Field1*</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *Aciton2Field2 - onchange =&gt; {submit =&gt; Action2, refresh_self =&gt; 1*<br><br></span><span style="font-family: courier new,monospace;">&nbsp; *RegionA END*<br><br>
&nbsp; *SubmitButton - onclick =&gt; {submit =&gt; undef} *<br><br>*FORM END*<br style="font-family: courier new,monospace;"></span>
<span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"></span><br><br>The idea is that RegionA can be changed based on Action2Field2&#39;s settings without submitting and reloading the entire form.&nbsp; In my case, the form is fairly large and it is a lot smoother if I can just refresh a small part of it.&nbsp; The problem is that since I am just refreshing RegionA, the SubmitButton is never redrawn.&nbsp; The act of submitting Action2 caused the button to be disabled due to the way 
jifty.js performs updates.<br><br>I have gone through the javascript code and understand what it is doing, but I would like advice on the best way to fix this - or perhaps there is a much better way to do the type of thing I am doing.&nbsp; I did experiment with just calling the &#39;
a.enable_input_fields()&#39; in a similar manner to if a submission fails and while this works for me, I doubt that it will work in general depending on how the DOM changed during the update.<br><br>Here are a few options that spring to mind for the fix:
<br><ol><li>Do not automatically disable all buttons in the form that have this action.&nbsp; Only disable the actual element that triggered the submit.&nbsp; I have a feeling that this might defeat the reason of the disable (so you couldn&#39;t resubmit while an update is outstanding).
</li><li>Keep a list of all disabled elements that fall outside of the fragment being replaced.&nbsp; Re-enable these on successful completion of the update.</li><li>Keep a list of all disabled elements regardless of where they are and re-enable those even if they have been replaced.&nbsp; If they aren&#39;t in the DOM, I don&#39;t think it would matter...
</li></ol>While I describe a specific case that is bothering me, I suspect that this problem will always happen if a submission does not replace the form that it is part of.<br><br>Like I said, I am happy to fix this, but would like some feedback before I embark on any changes.
<br><br>Ed<br><br>