Can anyone help with a Seaside jQuery ajax issue? I want to change the contents of a div when the mouse goes over a document element by means of an ajax call.
In this example, I have rendered a list of words as spans (one span per word). When the mouse goes over any span, I want to show the dictionary definition of the word in another div on the page. The dictionary definition has to be generated on the server side. So I have to reference the current span ("this") in my ajax processing. I find I can change the page contents as desired when the mouse moves over a span (see below) but I am completely clueless how to get the text of the span, the word itself, into the html I want to render. renderContentOn: html |aQuery anAjax| aQuery := html jQuery expression:'span'. anAjax := html jQuery ajax. anAjax script: [ :s | s << ( (s jQuery: #GlossViewer) html:'This was written by an ajax call')]. aQuery onMouseEnter: anAjax asFunction. html div id:#TextViewer; class:'TextPane'; with:[self renderWordsAsSpans: html]. html div id:#GlossViewer; class:'GlossPane'; with:'The grammatical analysis goes here'. html document addLoadScript: aQuery. My basic problem is that I have no real idea of how data is passed back to my program in an ajax call and how I can reference it in my code. The seaside documentation is not bad on JQuery as a whole, but explanations and examples of ajax processing with Jquery and Seaside are not easily found. If it's relevant I'm using Pharo 2.0 Summer and Seaside 3. Thanks. Ken -- View this message in context: http://forum.world.st/Seaside-JQuery-Ajax-processing-question-tp4704949.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.