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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to