cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Chávez <ccha...@agssa.net>
Subject Re: Javascript in the form
Date Thu, 21 Apr 2005 14:32:20 GMT

Roberto Marra Escribio :-)
> Hi all,
> I was checking some example of form with some javascript code inside. My
> question is, can I add javascript code as external file?
>
> <fd:selection-list src="cocoon:/cars" dynamic="true"/>
> <fd:on-value-changed>
> <javascript>
>   java.lang.System.err.println("maker changed from " + event.oldValue + "
> to " + event.newValue);
>   var value = event.source.value;
>   var typewidget = event.source.lookupWidget("../type");
>   if (value != null) {....
> </javascript>
> Instead of do that do something like
>
> <fd:selection-list src="cocoon:/cars" dynamic="true"/>
> <fd:on-value-changed>
> <javascript path="externlafile"/>

  Hi Roberto.

  You can add a file with javascript code using the sitemap,
  for example:

   <map:flow language="javascript">
        <map:script src="path to the file"/>
    ...

   then in the Cforms you can call the function.

  Cheers.
  Carlos Chávez.
>
>
> Can I?
>
> Thanx in advance
> Cheers
> Roberto
>
>
>
>


-- 
Carlos Chávez

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message