<div dir="ltr">Paul, I does work for me too with the #script:<div><br></div><div>I will continue the conversation privately with you as I want to share screenshots and it's easier. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 27, 2017 at 1:02 PM, Paul DeBruicker <span dir="ltr"><<a href="mailto:pdebruic@gmail.com" target="_blank">pdebruic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mariano,<br>
<br>
Thanks for agreeing to take a look. I'm glad to know it works for you.  That<br>
means I'm probably just Doing It Wrong.<br>
<br>
This method exhibits the error in my stone:<br>
<br>
<br>
renderContentOn: html<br>
  | id count |<br>
  count:=0.<br>
  id := html nextId.<br>
  html div<br>
    id: id;<br>
    with: count.<br>
  html<br>
    paragraph: [<br>
      html anchor<br>
        url: 'javascript:void(0)';<br>
        onClick:<br>
            (html jQuery ajax<br>
                script: [ :s |<br>
                  count := count + 1.<br>
                  s << (s jQuery id: id) text: count ]);<br>
        with: 'Increase using script' ].<br>
  html<br>
    paragraph: [<br>
      html anchor<br>
        url: 'javascript:void(0)';<br>
        onClick:<br>
            ((html jQuery id: id) load<br>
                html: [ :h |<br>
                  count := count - 10.<br>
                  h render: count ]);<br>
        with: 'Decrease using load' ]<br>
<br>
<br>
<br>
When the "Increase using script" link is clicked the count is not increased<br>
when the link is clicked (in the stone or browser) and the entire page is<br>
sent from the stone to the browser.<br>
<br>
When the 'Decrease using load' link is clicked the "count" in both the<br>
browser and stone is decreased.<br>
<br>
In Pharo 5 they both work properly.<br>
<br>
<br>
Thanks again<br>
<br>
Paul<br>
<br>
<br>
<br>
<br>
Mariano Martinez Peck wrote<br>
> On Fri, Mar 24, 2017 at 6:44 PM, Paul DeBruicker &lt;<br>
<br>
> pdebruic@<br>
<div><div class="h5"><br>
> &gt; wrote:<br>
><br>
>> I'm still having a problem with this and would be interested in learning<br>
>> if<br>
>> others are able to use JQAjax>>#script: on GemStone.<br>
>><br>
>><br>
>> For me it does the request, the server is updated, but the response is<br>
>> the<br>
>> entire page and not just the contents of the script block.<br>
>><br>
>><br>
>> Is there a way to work around this?<br>
>><br>
>> I could come up with an example pretty easily if ir would be helpful.<br>
>><br>
>><br>
> Hi Paul,<br>
><br>
> My app has become 90% AJAX requests and in 99% of them I use #script:<br>
> I can tell you that both on Pharo 5.0 and GemStone 3.3.3 (Seaside from<br>
> 'github://GsDevKit/Seaside31:<wbr>3.1.?/repository' ) it works correct (the<br>
> response is the script response and not whole page).<br>
><br>
> If you give me an reproducible example I can try in my stone.<br>
><br>
> Cheers,<br>
><br>
><br>
>> Thanks.<br>
>><br>
>><br>
>><br>
>> Paul DeBruicker wrote<br>
>> > In Pharo I can use a #script: send like this<br>
>> ><br>
>> >  html jQuery ajax<br>
>> >         callback: [ :json | self setMapBoundsFrom: json ]<br>
>> >           json: (JSStream on: 'map.getBounds()');<br>
>> >         script: [ :s | s << ((s jQuery id: #'results') html: [ :r |<br>
>> self<br>
>> > renderResultsOn: r ]) ]<br>
>> ><br>
>> ><br>
>> > And the #results id has its content set to the value of the<br>
>> > #renderResultsOn: method.<br>
>> ><br>
>> ><br>
>> > In GemStone it seems like a page refresh is happening instead.<br>
>> ><br>
>> ><br>
>> > Has anyone else seen this?  I think it was happening in older versions<br>
>> too<br>
>> > but I am not sure of what version combination.<br>
>> > ______________________________<wbr>_________________<br>
>> > seaside mailing list<br>
>><br>
>> > seaside@.squeakfoundation<br>
>><br>
>> > <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" rel="noreferrer" target="_blank">http://lists.squeakfoundation.<wbr>org/cgi-bin/mailman/listinfo/<wbr>seaside</a><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> View this message in context: <a href="http://forum.world.st/JQAjax-" rel="noreferrer" target="_blank">http://forum.world.st/JQAjax-</a><br>
>> script-in-GemStone-3-3-1-with-<wbr>Seaside-3-2-1-works-<br>
>> differently-than-in-pharo-<wbr>tp4925035p4939880.html<br>
>> Sent from the Seaside General mailing list archive at Nabble.com.<br>
>> ______________________________<wbr>_________________<br>
>> seaside mailing list<br>
>><br>
<br>
</div></div>> seaside@.squeakfoundation<br>
<span class=""><br>
>> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" rel="noreferrer" target="_blank">http://lists.squeakfoundation.<wbr>org/cgi-bin/mailman/listinfo/<wbr>seaside</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Mariano<br>
> <a href="http://marianopeck.wordpress.com" rel="noreferrer" target="_blank">http://marianopeck.wordpress.<wbr>com</a><br>
><br>
</span><span class="">> ______________________________<wbr>_________________<br>
> seaside mailing list<br>
<br>
> seaside@.squeakfoundation<br>
<br>
> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" rel="noreferrer" target="_blank">http://lists.squeakfoundation.<wbr>org/cgi-bin/mailman/listinfo/<wbr>seaside</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
</span>View this message in context: <a href="http://forum.world.st/JQAjax-script-in-GemStone-3-3-1-with-Seaside-3-2-1-works-differently-than-in-pharo-tp4925035p4940085.html" rel="noreferrer" target="_blank">http://forum.world.st/JQAjax-<wbr>script-in-GemStone-3-3-1-with-<wbr>Seaside-3-2-1-works-<wbr>differently-than-in-pharo-<wbr>tp4925035p4940085.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the Seaside General mailing list archive at Nabble.com.<br>
______________________________<wbr>_________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.<wbr>squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" rel="noreferrer" target="_blank">http://lists.squeakfoundation.<wbr>org/cgi-bin/mailman/listinfo/<wbr>seaside</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br></div>
</div>