<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">On 12/18/13 6:09 PM, Aaron Rosenzweig
wrote:<br>
</div>
<blockquote
cite="mid:1D0B2214-1678-4807-9FB2-191CA4407CC9@cocoanutstech.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
Hi Bob,
<div><br>
</div>
<div>Ahh ok. It took me a while to wrap my head around it but
that’s clever.</div>
<div><br>
</div>
<div>Basically you declared the “action” variable and then
assigned it an Ajax object. </div>
</blockquote>
Right - that assignment predated your request. I did that so I could
use the same code for both the onClick: and the onEnter:. It used to
read "onClick: action" and "onEnter: action". Similar to what you
were wanting to do - use the same callback in a number of places.<br>
<blockquote
cite="mid:1D0B2214-1678-4807-9FB2-191CA4407CC9@cocoanutstech.com"
type="cite">
<div>Though I don’t understand the underscores in the syntax.</div>
</blockquote>
old-school assignment (equivalent to colon-equal)<br>
<blockquote
cite="mid:1D0B2214-1678-4807-9FB2-191CA4407CC9@cocoanutstech.com"
type="cite">
<div><br>
</div>
<div>Then, in the end, you make a javascript function and pass in
the “action” variable’s guts but giving it the “greaseString”
message.</div>
<div><br>
</div>
<div>Thank you Bob - you were the only one to respond. I
appreciate it! :-)<br>
<div apple-content-edited="true">
<table style="margin-top: 0.5em; margin-left: 0.5em;
margin-bottom: 30px; position: static; z-index: auto;"
border="0">
<tbody>
<tr>
<td colspan="2" style="padding-bottom: 0.3em; "> <span
style="font-family:'Trebuchet
MS',helvetica,San-Serif;font-size:11px;color:#888888;line-height:22px"><b
style="color:#11aeab;text-transform:uppercase;letter-spacing:2px">Aaron
Rosenzweig</b> / <a moz-do-not-send="true"
href="http://www.chatnbike.com" title="visit Chat
'n Bike" style="text-decoration:none;
border-bottom:1px dotted #888888;color:#888888">Chat
'n Bike</a></span><br>
<span style="font-family:'Trebuchet
MS',helvetica,San-Serif;font-size:11px;color:#b2b2b2;"><b
style="color:#888888">e:</b> <a
moz-do-not-send="true"
href="mailto:aaron@chatnbike.com" title="email
Aaron" style="text-decoration:none;
border-bottom:1px dotted #b2b2b2;color:#b2b2b2">aaron@chatnbike.com</a> <b
style="color:#888888">t:</b> (301) 956-2319</span>
</td>
</tr>
<tr>
<td> <img moz-do-not-send="true"
src="http://www.chatnbike.com/WebObjects/FamilyCycleGroupOrder.woa/Contents/WebServerResources/images/chat_n_bike_logo_small.png"
alt="Chat 'n Bike" height="100"> </td>
<td> <img moz-do-not-send="true"
src="http://www.chatnbike.com/WebObjects/FamilyCycleGroupOrder.woa/Contents/WebServerResources/images/dealers/usa.jpg"
alt="Chat 'n Bike" height="100"> </td>
</tr>
</tbody>
</table>
</div>
<br>
<div>
<div>On Dec 17, 2013, at 6:24 AM, Bob Arning <<a
moz-do-not-send="true" href="mailto:arning315@comcast.net">arning315@comcast.net</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div text="#000000" bgcolor="#FFFFFF"> <font face="Georgia">I
certainly won't say this is the right way, but it seems
to work:<br>
<br>
renderGlobalSearchOn: html<br>
<br>
| inputId action |<br>
<br>
inputId _ html nextId.<br>
action _ html jQuery ajax <br>
callback: [ :v2 | <br>
filterString _ v2.<br>
selections _ Dictionary new.<br>
visibleChunks _ #().<br>
] <br>
value: (html jQuery id: inputId) value;<br>
<br>
script: self scriptForGlobalSearch.<br>
<br>
html script: 'function foobar27(){',action
greaseString,'}'.<br>
<br>
html div: [<br>
html button<br>
value: 'Search:';<br>
onClick: 'foobar27()';<br>
yourself.<br>
html textInput<br>
id: inputId;<br>
value: filterString;<br>
onEnter: 'foobar27()'.<br>
].<br>
<br>
<br>
Cheers,<br>
Bob<br>
<br>
</font>
<div class="moz-cite-prefix">On 12/16/13 8:25 PM, Aaron
Rosenzweig wrote:<br>
</div>
<blockquote
cite="mid:315FAB55-B17C-49E4-80F4-6DF71A9468B9@cocoanutstech.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
Oh c’mon, no takers?
<div><br>
</div>
<div>Nobody has faced this before?</div>
<div><br>
</div>
<div>I can’t believe something so easy in WebObjects is
so hard in Seaside. (Ok, that was below the belt). </div>
<div><br>
</div>
<div>In WO, all I have to do is drop an
“AjaxWOSubmitButton” component on the page and then
bind the “functionName” binding. I can immediately
call that name in Javascript from the client side and
anything in the “action” binding is performed and all
the form bindings are synchronized. </div>
<div><br>
</div>
<div>Thanks,<br>
<div>
<table
style="margin-top:0.5em;margin-left:0.5em;margin-bottom:30px;"
border="0">
<tbody>
<tr>
<td colspan="2" style="padding-bottom: 0.3em;
"> <span style="font-family:'Trebuchet
MS',helvetica,San-Serif;font-size:11px;color:#888888;line-height:22px"><b
style="color:#11aeab;text-transform:uppercase;letter-spacing:2px">Aaron
Rosenzweig</b> / <a
moz-do-not-send="true"
href="http://www.chatnbike.com/"
title="visit Chat 'n Bike"
style="text-decoration:none;
border-bottom:1px dotted
#888888;color:#888888">Chat 'n Bike</a></span><br>
<span style="font-family:'Trebuchet
MS',helvetica,San-Serif;font-size:11px;color:#b2b2b2;"><b
style="color:#888888">e:</b> <a
moz-do-not-send="true"
href="mailto:aaron@chatnbike.com"
title="email Aaron"
style="text-decoration:none;
border-bottom:1px dotted
#b2b2b2;color:#b2b2b2">aaron@chatnbike.com</a> <b
style="color:#888888">t:</b> (301)
956-2319</span> </td>
</tr>
<tr>
<td> <img moz-do-not-send="true"
src="http://www.chatnbike.com/WebObjects/FamilyCycleGroupOrder.woa/Contents/WebServerResources/images/chat_n_bike_logo_small.png"
alt="Chat 'n Bike" height="100"> </td>
<td> <img moz-do-not-send="true"
src="http://www.chatnbike.com/WebObjects/FamilyCycleGroupOrder.woa/Contents/WebServerResources/images/dealers/usa.jpg"
alt="Chat 'n Bike" height="100"> </td>
</tr>
</tbody>
</table>
</div>
<br>
<div>
<div>On Dec 15, 2013, at 9:50 AM, Aaron Rosenzweig
<<a moz-do-not-send="true"
href="mailto:aaron@cocoanutstech.com">aaron@cocoanutstech.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1252">
<div style="word-wrap: break-word;
-webkit-nbsp-mode: space; -webkit-line-break:
after-white-space;">Hello,
<div><br>
</div>
<div>Is there a way to “name” a PTAjax callback
so that it can be conveniently invoked from
javascript?</div>
<div><br>
</div>
<div>Situation:</div>
<div>Want to effectively have a submit button
(or hyperlink) on the page with an on click
Updater callback… then from something
programmatically on the page… *click* that
link.</div>
<div><br>
</div>
<div>Problems:</div>
<div>1) Having a hidden button or link to click
is not elegant (I feel dirty)</div>
<div><br>
</div>
<div>2) It doesn’t always work. For various
reasons, doing a domElement.click() is not the
same as a human hand doing a click because it
doesn’t generate a full mouse click event.</div>
<div><br>
</div>
<div>Thought:</div>
<div>There must be a way to setup the following:</div>
<div>A) Create a PTAjax object with a name that
is a global javascript variable on the client
side (web browser)</div>
<div><br>
</div>
<div>B) You would provide the “javascript
function name” a “seaside callback” a “HTML
form ID or form name” so that synchronization
of form variables can take place and finally
an “update container ID”</div>
<div><br>
</div>
<div>C) You could just invoke it from your
javascript code and know that it will safely
update the server.</div>
<div><br>
</div>
<div>Does this make sense?</div>
<div>
<table
style="margin-top:0.5em;margin-left:0.5em;margin-bottom:30px;"
border="0">
<tbody>
<tr>
<td colspan="2" style="padding-bottom:
0.3em; "> <span
style="font-family:'Trebuchet
MS',helvetica,San-Serif;font-size:11px;color:#888888;line-height:22px"><b
style="color:#11aeab;text-transform:uppercase;letter-spacing:2px">Aaron
Rosenzweig</b> / <a
moz-do-not-send="true"
href="http://www.chatnbike.com/"
title="visit Chat 'n Bike"
style="text-decoration:none;
border-bottom:1px dotted
#888888;color:#888888">Chat 'n
Bike</a></span><br>
<span style="font-family:'Trebuchet
MS',helvetica,San-Serif;font-size:11px;color:#b2b2b2;"><b
style="color:#888888">e:</b> <a
moz-do-not-send="true"
href="mailto:aaron@chatnbike.com"
title="email Aaron"
style="text-decoration:none;
border-bottom:1px dotted
#b2b2b2;color:#b2b2b2">aaron@chatnbike.com</a> <b
style="color:#888888">t:</b> (301)
956-2319</span> </td>
</tr>
<tr>
<td> <img moz-do-not-send="true"
src="http://www.chatnbike.com/WebObjects/FamilyCycleGroupOrder.woa/Contents/WebServerResources/images/chat_n_bike_logo_small.png"
alt="Chat 'n Bike" height="100"> </td>
<td> <img moz-do-not-send="true"
src="http://www.chatnbike.com/WebObjects/FamilyCycleGroupOrder.woa/Contents/WebServerResources/images/dealers/usa.jpg"
alt="Chat 'n Bike" height="100"> </td>
</tr>
</tbody>
</table>
</div>
<br>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
seaside mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>
</pre>
</blockquote>
<br>
</div>
_______________________________________________<br>
seaside mailing list<br>
<a moz-do-not-send="true"
href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>