Dave,
Not sure what exactly is the question. Here is what pops to my mind:
html div
script: (html jQuery this on: 'click' do: ((JSStream on: 'if(e.keyCode === 18) … ‘) asFunction: #(e)))
Seaside’s Javascript generation feature is focused on generating wrapper code around Seaside-generated JQuery callbacks, etc.. so you can easily tie those together with your Javascript code.
If you’re looking to add (jQuery) ajax callbacks in your JS code, here’s an example:
html div
script: (html jQuery this on: 'click' do: (((JSStream on: 'e.keyCode === 18') then: (html jQuery ajax callback:[ … ])) asFunction: #(e)))
If you need the keyCode to be transported to the server:
html div
script: (html jQuery this on: 'click' do: ((html jQuery ajax callback:[:keyCode | ... ] value: ((html javascript alias:'e') access: 'keyCode')) asFunction: #(e)))
And there’s many more possibilities.
In general, I think you need to do as much as possible in hand-written Javascript and use Seaside-Javascript to glue server-side Smalltalk callbacks to your client-side Javascript code.
cheers
Johan
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside