<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body 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>
      &nbsp;&nbsp;&nbsp; | inputId action |<br>
      &nbsp;&nbsp;&nbsp; <br>
      &nbsp;&nbsp;&nbsp; inputId _ html nextId.<br>
      &nbsp;&nbsp;&nbsp; action _ html jQuery ajax <br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; callback: [ :v2 | <br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; filterString _ v2.<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; selections _ Dictionary new.<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; visibleChunks _ #().<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ] <br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; value: (html jQuery id: inputId) value;<br>
      <br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; script: self scriptForGlobalSearch.<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
      &nbsp;&nbsp;&nbsp; html script: 'function foobar27(){',action greaseString,'}'.<br>
      &nbsp;&nbsp;&nbsp; <br>
      &nbsp;&nbsp;&nbsp; html div: [<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; html button<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; value: 'Search:';<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; onClick: 'foobar27()';<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; yourself.<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; html textInput<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; id: inputId;<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; value: filterString;<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; onEnter: 'foobar27()'.<br>
      &nbsp;&nbsp;&nbsp; ].<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=ISO-8859-1">
      Oh c&#8217;mon, no takers?
      <div><br>
      </div>
      <div>Nobody has faced this before?</div>
      <div><br>
      </div>
      <div>I can&#8217;t believe something so easy in WebObjects is so hard in
        Seaside. (Ok, that was below the belt).&nbsp;</div>
      <div><br>
      </div>
      <div>In WO, all I have to do is drop an &#8220;AjaxWOSubmitButton&#8221;
        component on the page and then bind the &#8220;functionName&#8221; binding.
        I can immediately call that name in Javascript from the client
        side and anything in the &#8220;action&#8221; binding is performed and all
        the form bindings are synchronized.&nbsp;</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>&nbsp;/&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<b
                      style="color:#888888">t:</b>&nbsp;&nbsp;(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 &lt;<a
              moz-do-not-send="true"
              href="mailto:aaron@cocoanutstech.com">aaron@cocoanutstech.com</a>&gt;
            wrote:</div>
          <br class="Apple-interchange-newline">
          <blockquote type="cite">
            <meta http-equiv="Content-Type" content="text/html;
              charset=ISO-8859-1">
            <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 &#8220;name&#8221; 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&#8230; then from something programmatically on the
                page&#8230; *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&#8217;t always work. For various reasons, doing
                a domElement.click() is not the same as a human hand
                doing a click because it doesn&#8217;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 &#8220;javascript function name&#8221; a
                &#8220;seaside callback&#8221; a &#8220;HTML form ID or form name&#8221; so that
                synchronization of form variables can take place and
                finally an &#8220;update container ID&#8221;</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>&nbsp;/&nbsp;<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>&nbsp;&nbsp;<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>&nbsp;&nbsp;<b
                            style="color:#888888">t:</b>&nbsp;&nbsp;(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 class="moz-txt-link-abbreviated" href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a>
<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>
</pre>
    </blockquote>
    <br>
  </body>
</html>