Hi Malte,<div><br></div><div>I tried modifying the JQDialogFunctionalTest&gt;&gt;#renderOpenWindowOn: to add an extra button. The relevant modifications are:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>html jQuery new dialog</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>title: &#39;Vegetables&#39;;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>autoOpen: false;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>addButton: &#39;Close&#39; do: html jQuery new dialog close;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>addButton: &#39;Ok&#39; do: (html jQuery ajax script: [:s | self halt ])</div><div><br></div><div>where you&#39;d substitute the action associated with &#39;OK&#39; to your requirements. The dialog sample is viewable from: <a href="http://localhost:8080/javascript/jquery-ui/dialogwidget">http://localhost:8080/javascript/jquery-ui/dialogwidget</a></div>
<div><br></div><div>I think the JQDialog&gt;&gt;#buttons: comment is misleading as IIUC it should take a dictionary not an array.</div><div><br></div><div>Your code could be modified to something like (untested):</div><div>
<br></div><div><div>testButtons: html</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Dictionary new</div><div>    <span class="Apple-tab-span" style="white-space:pre">        </span>at: &#39;Annuleer&#39; put: (html jQuery ajax script: [ :h | self actionCancel: h ]);</div>
<div>        at: &#39;Ok&#39; put: (html jQuery ajax </div><div>          serializeForm: (html jQuery id: self personDataFormId) ;</div><div>          script: [ :s | self actionFinish: s ]);</div><div>          yourself</div>
</div><div><br></div><div>Hope this helps</div><div><br></div><div>Nick</div><div><br></div><div><br><div class="gmail_quote">On 24 January 2012 08:06, Malte Grunwald <span dir="ltr">&lt;<a href="mailto:malte.grunwald@googlemail.com">malte.grunwald@googlemail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hey everybody,<br>
    <br>
    I have this problem for a while now and not found a solution until
    now.<br>
    I already brought this up, a few months ago, some people tried to
    help me, but I did not found a solution.<br>
    <br>
    I will use a JQDialog with multiple buttons, i.e. &quot;cancel&quot; and
    &quot;confirm&quot;.<br>
    The cancel button should only close the window. <br>
    No problem so far.<br>
    But now the tricky part, the &quot;confirm&quot; button should serialize a
    form, send an ajax request to update a div container and then close
    the window.<br>
    <br>
    My problem is, I am not able to attach more than one method to a
    button.<br>
    <br>
    Here my example dialog:<br>
    <br>
    <small><i>(html div)<br>
                id: anIdString;<br>
                script: (((html jQuery id: anIdString) dialog)<br>
                            title: (anIdString copyFrom: 4 to:
        anIdString size);<br>
                            autoOpen: false;<br>
                            modal: true;<br>
                            width: anInteger;<br>
                            height: &#39;auto&#39;;<br>
                            resizable: false;<br>
                            addButton: &#39;Close&#39; do: html jQuery new
        dialog close);<br>
                with: [self dialogContent: html]</i></small><br>
    <br>
    This is a suggestion, Jan van de Sandt made. Thanks again.<br>
    <br>
    <div><i><small>testButtons: html</small></i><br>
    </div>
    <div><span style="white-space:pre-wrap"> </span><i><small>^
          OrderedCollection new</small></i></div>
    <i><small>
      </small></i>
    <div><i><small><span style="white-space:pre-wrap">
          </span>add: (Dictionary new</small></i></div>
    <div><i><small><span style="white-space:pre-wrap">
          </span>at: &#39;id&#39; put: html nextId ;</small></i></div>
    <div><i><small><span style="white-space:pre-wrap">
          </span>at: &#39;text&#39; put: &#39;Annuleer&#39; ;</small></i></div>
    <i><small>
      </small></i>
    <div><i><small><span style="white-space:pre-wrap">
          </span>at: &#39;click&#39; put: (html jQuery ajax script: [ :h | self
          actionCancel: h ]) asFunction ;</small></i></div>
    <div><i><small><span style="white-space:pre-wrap">
          </span>yourself) ;</small></i></div>
    <i><small>
      </small></i>
    <div><i><small><span style="white-space:pre-wrap"> </span>add: (Dictionary new</small></i></div>
    <div><i><small><span style="white-space:pre-wrap">
          </span>at: &#39;id&#39; put: html nextId ;</small></i></div>
    <div><i><small><span style="white-space:pre-wrap">
          </span>at: &#39;text&#39; put: &#39;Ok&#39; ;</small></i></div>
    <i><small>
      </small></i>
    <div><i><small><span style="white-space:pre-wrap">
          </span>at: &#39;click&#39; put: (html jQuery ajax </small></i></div>
    <div><i><small><span style="white-space:pre-wrap">
          </span>serializeForm: (html jQuery id: self personDataFormId)
          ;</small></i></div>
    <i><small>
      </small></i>
    <div><i><small><span style="white-space:pre-wrap">
          </span>script: [ :s | self actionFinish: s ]) asFunction ;</small></i></div>
    <div><i><small><span style="white-space:pre-wrap">
          </span>yourself) ;</small></i></div>
    <div><i><small><span style="white-space:pre-wrap">
          </span>asArray<br>
          <br>
          <br>
        </small></i><br>
      <small><i>(html div)<br>
                  id: anIdString;<br>
                  script: (((html jQuery id: anIdString) dialog)<br>
                              title: (anIdString copyFrom: 4 to:
          anIdString size);<br>
                              autoOpen: false;<br>
                              modal: true;<br>
                              width: anInteger;<br>
                              height: &#39;auto&#39;;<br>
                              resizable: false;<br>
                              addButton: &#39;Close&#39; do: html jQuery new
          dialog close);<br>
                              buttons: (self testButtons: html);<br>
                  with: [self dialogContent: html]</i></small><br>
      <i><small><br>
          <br>
        </small></i><small><big><big><small>But this did not work for
              me.<br>
              Maybe somebody have an idea.<br>
              <br>
              Thank you very much!<br>
              <br>
              Kind regards <br><span class="HOEnZb"><font color="#888888">
              <br>
              Malte</font></span></small><br>
          </big></big></small></div>
    <br>
  </div>

<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div></div>