cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Quenot <...@anyware-tech.com>
Subject Re: Question about addition of "-input" to id of CForms widgets
Date Thu, 13 Oct 2005 11:28:37 GMT
* Ugo Cei:

> * Bruno Dumon ha scritto:
>
> >The problem  is that (at  least for me) this  requires updating
> >some javascript here and there which  makes use of the IDs, and
> >more annoying, that it makes it  hard to support both 2.1.7 and
> >2.1.8 at the same time for the same application.
>
> I agree. I  discovered this  by chance when  some scripts  I had
> that  used document.getElementById()  stopped  working after  an
> update.

Same  here.   And  it's  a  show-stopper  that  prevents  us  from
upgrading the Cocoon Forms stylesheets.   Moving to AJAX costs the
refactoring  of all  client-side  Javascripts  that retrieve  HTML
elements generated by Cocoon Forms.

However the refactoring is sometimes easy: when for example the
script is only dealing with selection lists, simply replace
getElementById\("(.*)"\) by getElementById("\1-select").

You can support both 2.1.7 and 2.1.8 if you use the same set of
CForms stylesheets for both.
-- 
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

Mime
View raw message