cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Madu" <>
Subject Entire page being re-written between DIV tags after dojo/ajax/Cform submit
Date Thu, 13 Jul 2006 00:51:21 GMT
I have finally started get this dojo thing working, to a degree! The problem
I am having at the moment is that after a form is submitted the entire page
is re-written to the div tag I have assigned to hold the returned results,
instead of just the form (widgets) section. My code is as follows:

my Dojo.js:

function init()
    var x = new{

    formNode: "Form1",

    load: function(load, data, e) {
      dojo.byId('output').innerHTML = data;

    error: function(type, error) {
        alert("Error: " + type + "n" + error);

    <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-
      <ft:form-template action="details.kont" id="Form1" method="post"
        <ft:group id="creditCardDetails">
        <div id="output">
            <table border="0" cellspacing="0" cellpadding="0">
                      <td width="55" valign="bottom"><img
src="images/firstname.gif" width="89" height="16" /></td>
                      <td width="220" valign="top" align="left">
                              <fi:styling type="tabs"/>
                                        <ft:widget id="fname">
                                            <fi:styling listbox-size="22"
class="keyinbox" value="${userGlobal.getFirstName()}"/>
            <tr><td><input type="submit" name="send" value="Send"


As I mentioned earlier, the sumitted results are being returned correctly,
it's just that it is being returned with the rest of the page as well, so
every time I click submit I get the page re-written inside itself again,
when all I want is the form area to be re-displayed. How do I remedy this

Also I have noticed that the next process in flow after the form, which is a
cocoon.sendPageAndWait("orderSuccess.xml", {"OrderDetails":neworder}),  has
successfully been submitted also loads in the DIV tag instead of instead of
in the window. What is the issue with this as well?


View raw message