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
_______________________________________________
Kss-devel mailing list
Kss-devel@codespeak.net
http://codespeak.net/mailman/listinfo/kss-devel

Reply via email to