[Seaside] Javascript question

Lukas Renggli renggli at gmail.com
Sat Nov 20 11:28:59 UTC 2010


> To create the following function:
>
> function(node) {
>        if (node.leaf) {
>                node.onClick(node.id);
>                {$.ajax({"url":"/CQNowS","data":["_s=VPFmqrxxYQGh1ycn","_k=wjnMpQBbQbIebYiP","2","3="+node.id].join("&")})}
>        }
> }

The point of the Javascript support classes *is not* to create
complicated code like this (although it can be done). The idea is
compose and configure different existing parts with each other. In
your case I suggest that you put your Javascript functionality into an
external Javascript file, create your own Seaside wrapper and call it
from Smalltalk.

> function(node){if("node.leaf"){node.onClick("node.id")}}
>
> How do I make the "node.leaf" and "node.id" into references rather than strings?

JSStream on: 'node.id'

Lukas

-- 
Lukas Renggli
www.lukas-renggli.ch


More information about the seaside mailing list