You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Carlos Martínez <ca...@uib.es> on 2008/02/26 11:25:14 UTC

Form variable in fd:javascript

Hello,

I am trying to send a form object throught a flowscript call in a 
definition of a field, using cforms.

My code looks like this:

Definition:

<fd: on-action>
    <fd:javascript>
         cercador(event.source.getForm()) ;
    </fd:javascript>
</fd: on-action>

Flowscript:

function cercador(form){
   form.createBinding("cocoon:/cercar_binding.src");
   var xml = loadDocument("recursos/xml/mibinding.xml");
   form.load(xml);
}


But when I try to apply a form function in the flowscript it seems that 
the form variable doesn't have the real form object.

Error:

org.mozilla.javascript.EcmaError: createBinding is not a function.

Thanks.

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