<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-09-22 9:13 GMT+02:00 Johan Brichau <span dir="ltr">&lt;<a href="mailto:johan@inceptive.be" target="_blank">johan@inceptive.be</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thomas,<br>
<br>
You can use the jQuery binding in Seaside to easily return javascript values in ajax callbacks.<br>
For example:<br>
<br>
html<br>
        button;<br>
        onClick: (html jQuery ajax callback: [:value | Transcript show: value ] value: (html javascript call: ‘test’ withArguments: #()))<br>
        with: ‘Call test’<br></blockquote><div><br></div><div>I tried this but it doesn&#39;t work, nothing appeared in the Transcript like if the callback isn&#39;t triggered...<br></div><div>Maybe I forget something in the configuration of application<br>(WAAdmin register: self asApplicationAt: &#39;Test&#39;)<br>        addLibrary: JQDevelopmentLibrary;<br></div><div>        addLibraby: MyLibraryWithJsFiles<br><br></div><div>MyLibraryWithJsFiles contains just a js file with test() { return true; }<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
The #callback:value: method passes the result of client-side expression to the server-side callback.<br>
Mind that (as the method comment states), this only works for single literal Javascript object (String, Number, Boolean). If you want to pass more complex result values, you can use #callback:json: or write your own serialization if json serialization is not sufficient either.<br>
<br>
Hope this answers your question,<br>
Johan<br></blockquote><div><br><br></div><div>Thanks for your help,<br></div><div><br></div><div>Thomas <br></div></div><br></div></div>