KSS, client action on server
January 13th, 2009 by kc
I’m using KSS in Plone to ajaxify user interface actions. When you’ve got a server-side KSS method and would like to call a client action, here’s how it is done:
self.commands.addCommand(‘alert’, ‘.dummy-selector, message=’I'm called from the server!’)
self.commands.addCommand(‘myKssAction’, ‘my-selector’, param_1=”, param_n=”)
This way you can do necessary things (like storing data from a form), update the info on the page and using the above to call a Jquery function to do fancy style effects.
Simple as that!