[Kss-devel] return of javascript code on server side
Vladislav Vorobiev
mymir.org at googlemail.com
Fri Dec 12 19:23:32 CET 2008
Hello all,
I am interesting on return of the Javascript code on the server-side.
Kss plug-in looks like so:
ksswidth.js
kukit.actionsGlobalRegistry.register("ksswidth", function(oper) {
// oper.completeParms(['text'], {}, 'ksswidth action');
// alert(oper.parms.text);
// alert(document.body.clientWidth);
a=document.body.clientWidth;
// document.getElementById('inputElementOnMySite').value=b;
return a;
});
kukit.commandsGlobalRegistry.registerFromAction('ksswidth',
kukit.cr.makeSelectorCommand);
ksswidth.py
class ksswidth(CommandSet):
interface.implements(Iksswidth)
def demo(self, selector, text):
command = self.commands.addCommand('ksswidth', selector)
command.addParam('text', text)
It is possible to access "a variable of javascript" in a server side
python-script(Zope2)?
core=getKSSCommandSet('ksswidth').demo('#hiddendiv', 'ok')
return renderKSSCommands()
I wont to fetch clientWidth and return images for this width.
Best regards
Vlad
More information about the Kss-devel
mailing list