cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto Brosich <abros...@ogs.trieste.it>
Subject Reset button doesn't work properly
Date Mon, 17 Sep 2007 13:43:40 GMT

I have a form with some widgets containing javascript code that set the
selection list of other widgets.
The reset button resets only widgets without javascript code.

Follow the definition of the reset button from the form model:

    <fd:submit id="reset" validate="false">
      <fd:label>Reset</fd:label>
    </fd:submit>

and  the javascript code
...
      <fd:on-value-changed>
      <javascript>
               var value = event.source.value;
              var inswidget = event.source.lookupWidget("../institutes");

              if (value !="") {
                // Get the corresponding institutes list
               
inswidget.setSelectionList("cocoon:/lov-institutes?wherecond=cty_code='"
+ value + "'");
              }
             
              inswidget.value = null;
       </javascript>
       </fd:on-value-changed>

...

and how it's handle with the flowscript
...
        if (form.submitId == "reset") {
          // the user pressed reset
            form.showForm("");
        } else
...

Maybe something about javascript code? I cannot find any useful hint
within cocoon samples.

Thanks in advance

Alberto Brosich


Cocoon 2.1.10
Debian/Linux lenny
Java 1.5



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


Mime
View raw message