<br>some fyi's...<br><br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">* used dojo.byId instead of document.getElementById</blockquote>
<div><br>there's a macro named $ in the ajax branch for this<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">What I did not yet:<br>
* pulling common code into a separate static javascript file (I am not<br>sure how to do it in a proper manner, because the javascript should be<br>loaded only when there are UCW forms in the document)<br></blockquote><div>
<br>you can stuff into a global js as much as you want and have the browser cache the js file for you. see <a href="http://www.uncommon-web.com/darcsweb/darcsweb.cgi?r=ucw_ajax;a=headblob;f=/src/per-application-parenscript.lisp">
per-application-parenscript.lisp</a> especially in the ajax branch where it's full of stuff already. </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
* pulling out generic code like a check if a number is between two other<br>numbers (it would be laconic to write something like isNumberBetween<br>(field.value, 2, 10);)</blockquote><div><br>don't know what you mean here, but having an (
ucw.forms.validators.number.between field-id 10 20) does not seem to be that bad. again, the ajax branch has many similar constructs...<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
* fixing bugs which were found in the process</blockquote><div><br>there's a pending form field patch by Marijn that fixes several bugs but it's being updated for the new infrastructure in the ajax branch that simplifies it.
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">* In the form-specific javascript the "form" variable is global.<br>Theoretically, this can lead to very bad consequences if there are more
<br>than one form on a page.</blockquote><div><br>fixed in ajax: <ucw:script generates non-toplevel js unless asked for the opposite and it can also be asked to compile the parenscript at compile-time.<br></div><br></div>
-- <br>- attila<br><br>"- The truth is that I've been too considerate, and so became unintentionally cruel...<br> - I understand.<br> - No, you don't understand! We don't speak the same language!"<br><br>Ingmar Bergman - Smultronstället (Wild Strawberries)