<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">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).&nbsp;</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.&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 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 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 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 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 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=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></div><div></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 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 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 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 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></body></html>