In Pharo I can use a #script: send like this
html jQuery ajax callback: [ :json | self setMapBoundsFrom: json ] json: (JSStream on: 'map.getBounds()'); script: [ :s | s << ((s jQuery id: #'results') html: [ :r | self renderResultsOn: r ]) ] And the #results id has its content set to the value of the #renderResultsOn: method. In GemStone it seems like a page refresh is happening instead. Has anyone else seen this? I think it was happening in older versions too but I am not sure of what version combination. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
I'm still having a problem with this and would be interested in learning if others are able to use JQAjax>>#script: on GemStone.
For me it does the request, the server is updated, but the response is the entire page and not just the contents of the script block. Is there a way to work around this? I could come up with an example pretty easily if ir would be helpful. Thanks.
|
On Fri, Mar 24, 2017 at 6:44 PM, Paul DeBruicker <[hidden email]> wrote: I'm still having a problem with this and would be interested in learning if Hi Paul, My app has become 90% AJAX requests and in 99% of them I use #script: I can tell you that both on Pharo 5.0 and GemStone 3.3.3 (Seaside from 'github://GsDevKit/Seaside31:3.1.?/repository' ) it works correct (the response is the script response and not whole page). If you give me an reproducible example I can try in my stone. Cheers,
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Mariano,
Thanks for agreeing to take a look. I'm glad to know it works for you. That means I'm probably just Doing It Wrong. This method exhibits the error in my stone: renderContentOn: html | id count | count:=0. id := html nextId. html div id: id; with: count. html paragraph: [ html anchor url: 'javascript:void(0)'; onClick: (html jQuery ajax script: [ :s | count := count + 1. s << (s jQuery id: id) text: count ]); with: 'Increase using script' ]. html paragraph: [ html anchor url: 'javascript:void(0)'; onClick: ((html jQuery id: id) load html: [ :h | count := count - 10. h render: count ]); with: 'Decrease using load' ] When the "Increase using script" link is clicked the count is not increased when the link is clicked (in the stone or browser) and the entire page is sent from the stone to the browser. When the 'Decrease using load' link is clicked the "count" in both the browser and stone is decreased. In Pharo 5 they both work properly. Thanks again Paul
|
Paul, I does work for me too with the #script: I will continue the conversation privately with you as I want to share screenshots and it's easier. On Mon, Mar 27, 2017 at 1:02 PM, Paul DeBruicker <[hidden email]> wrote: Hi Mariano, _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |