<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Georgia">happens to me when I write js with my Smalltalk
hat on. Periods instead of semicolons at the end of a statement.</font><br>
<br>
<div class="moz-cite-prefix">On 9/22/15 1:21 PM, Thomas Heniart
wrote:<br>
</div>
<blockquote
cite="mid:CALPibtwqdxCO-pj-gyhwWj11sqUc9ffYKF79kSmX0U58Gh0LMQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>I get this error when I load the page:<br>
SyntaxError: expected expression, got '.'<br>
</div>
<div>and I don't know why :/<br>
</div>
<div>What could it be?<br>
</div>
<div><br>
<br>
</div>
<div>Cheers,<br>
</div>
<div>Thomas<br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-09-22 18:31 GMT+02:00 Thomas
Heniart <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:heniart.thomas@gmail.com" target="_blank">heniart.thomas@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote"><span class="">2015-09-22 9:13
GMT+02:00 Johan Brichau <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:johan@inceptive.be" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:johan@inceptive.be">johan@inceptive.be</a></a>></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>
</span>
<div>I tried this but it doesn't work, nothing
appeared in the Transcript like if the callback
isn't triggered...<br>
</div>
<div>Maybe I forget something in the configuration of
application<br>
(WAAdmin register: self asApplicationAt: 'Test')<br>
addLibrary: JQDevelopmentLibrary;<br>
</div>
<div> addLibraby: MyLibraryWithJsFiles<br>
<br>
</div>
<div>MyLibraryWithJsFiles contains just a js file with
test() { return true; }<br>
</div>
<span class="">
<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>
</span>
<div>Thanks for your help,<br>
</div>
<div><br>
</div>
<div>Thomas <br>
</div>
</div>
<br>
</div>
</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>