Hi,
as with my little daughter I need some help to do even small steps (with
Cocoon 2.1.10).
I have an ajaxed CForm with a text input and a submit button, provided
by test.fd.xml (definition), test.ft.xml (template), sitemap and test.js
for the flow.

Depending on wind and weather the browser sends 1 to 3 requests, makes
an update on continuation without (!) reaching my print-statement in the
flow, and receives one of code 200, 500 (internal server error) or 404
("undefined" not found, of course, why the heck does it call
"undefined"). On display everything is either fine, the textfield is
emptied, and/or it shows a red exclamation mark noting that (the just
filled) textfield is empty and required...

:-?
Florian



### test.fd.xml (definition): ###

<fd:field id="mytext" required="true">
  <fd:label>My text:</fd:label>
  <fd:datatype base="string"/>
  <fd:on-value-changed>
    <fd:javascript>
      print("user changed mytext");
    </fd:javascript>
  </fd:on-value-changed>
</fd:field>



### test.ft.xml (template): ###

<ft:form-template action="${continuation.id}.cont" method="POST"
ajax="true">
  <div>
    <ft:widget-label id="mytext"/>
    <ft:widget id="mytext" fi:submit-on-change="true"/>
  </div>
  <input type="submit" name="submitBtn"/>
</ft:form-template>


### sitemap: ###

<map:match pattern="test">
  <map:call function="doTest"/>
</map:match>

<map:match pattern="*.cont">
  <map:call continuation="{1}" />
</map:match>

### test.js: ###

function doTest () {
    var form = new Form("test.fd.xml");
    var i = 0;
    do {
        /** called before sending Page */
        print("test #"+i);
        form.showForm("test.ft.xml");
        i++;
    } while ( form.lookupWidget("mytext").getValue() != "foo" ) ;


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to