<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
You can chain in jQuery. Otherwise, I'm a big fan of doing an ajax request and passing a function to the #onSuccess: event of it. For example:<div><br></div><div>(this code isn't tested, so I may make a couple mistakes)</div><div><br></div><div>...</div><div>#addButton: ( (html jQuery ajax script: [:s | s add: (self thisFunctionDoesSomethingServersideAndUpdatesADivOn: s) ] ) onSuccess: ( html jQuery new dialog close ) ).<br><div>...</div><div><br></div><div>Hope that helps,</div><div>RS<br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Tue, 24 Jan 2012 09:06:49 +0100<br>From: malte.grunwald@googlemail.com<br>To: seaside@lists.squeakfoundation.org<br>Subject: [Seaside] JQDialog button problems<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
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. "cancel" and
"confirm".<br>
The cancel button should only close the window. <br>
No problem so far.<br>
But now the tricky part, the "confirm" 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: 'auto';<br>
resizable: false;<br>
addButton: 'Close' 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 class="ecxApple-tab-span" style="white-space:pre"> </span><i><small>^
OrderedCollection new</small></i></div>
<i><small>
</small></i>
<div><i><small><span class="ecxApple-tab-span" style="white-space:pre">
</span>add: (Dictionary new</small></i></div>
<div><i><small><span class="ecxApple-tab-span" style="white-space:pre">
</span>at: 'id' put: html nextId ;</small></i></div>
<div><i><small><span class="ecxApple-tab-span" style="white-space:pre">
</span>at: 'text' put: 'Annuleer' ;</small></i></div>
<i><small>
</small></i>
<div><i><small><span class="ecxApple-tab-span" style="white-space:pre">
</span>at: 'click' put: (html jQuery ajax script: [ :h | self
actionCancel: h ]) asFunction ;</small></i></div>
<div><i><small><span class="ecxApple-tab-span" style="white-space:pre">
</span>yourself) ;</small></i></div>
<i><small>
</small></i>
<div><i><small><span class="ecxApple-tab-span" style="white-space:pre"> </span>add: (Dictionary new</small></i></div>
<div><i><small><span class="ecxApple-tab-span" style="white-space:pre">
</span>at: 'id' put: html nextId ;</small></i></div>
<div><i><small><span class="ecxApple-tab-span" style="white-space:pre">
</span>at: 'text' put: 'Ok' ;</small></i></div>
<i><small>
</small></i>
<div><i><small><span class="ecxApple-tab-span" style="white-space:pre">
</span>at: 'click' put: (html jQuery ajax </small></i></div>
<div><i><small><span class="ecxApple-tab-span" style="white-space:pre">
</span>serializeForm: (html jQuery id: self personDataFormId)
;</small></i></div>
<i><small>
</small></i>
<div><i><small><span class="ecxApple-tab-span" style="white-space:pre">
</span>script: [ :s | self actionFinish: s ]) asFunction ;</small></i></div>
<div><i><small><span class="ecxApple-tab-span" style="white-space:pre">
</span>yourself) ;</small></i></div>
<div><i><small><span class="ecxApple-tab-span" style="white-space:pre">
</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: 'auto';<br>
resizable: false;<br>
addButton: 'Close' 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>
<br>
Malte</small><br>
</big></big></small></div>
<br>
<br>_______________________________________________
seaside mailing list
seaside@lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</div></div></div>                                            </div></body>
</html>