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 M. S. Bento Nogueira" <cm...@student.dei.uc.pt> on 2005/06/28 03:48:37 UTC

[cforms] not working

Hello cocoon users.

I'm trying to use a slightly modified versions of cforms examples
on cocoon/samples/blocks/forms/form1. I wanted to copy the behaviour
on this example(see it on number field tab) that fills an input field with 
a value just insert on another input field.

Here are my code snippets:

form1.xml

<fd:field id="peso" xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
<fd:label>Peso</fd:label>

<fd:datatype base="decimal"/>
<fd:on-value-changed>
<javascript>
 	var novoPeso = event.source.value;
 	if (novoPeso != null)
 	{
             	var heparina = event.source.parent.lookupWidget("heparina");
             if (heparina.value == null)
             {
               heparina.setValue(new java.lang.Long(novoPeso.intValue()*300));
             }
           }
</javascript>
(...)

form1_template_action.xml
<ft:widget id="peso">
 	<fi:styling size="1" submit-on-change="true"/>
</ft:widget>

NOTES:
-I've tried both in firefox and iexplore and it doesn't work.
-I've tried also submit-on-click with the same results.
-The javascript console shows the following error, both in the cforms
example and in my code: Error: uncaught exception: Permition denied to 
obtain property HTMLDivElement.parentNode


TIA,
CN

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