Hi all.
I've got some LiveElements in an Athena page to which I want to attach event
handlers. Their XHTML is stan-based.
What I've got right now (which works) is something like this, which I've
understood is the Right Way to do it if you're explicitly using inline
Javascript:
_js = (
"Nevow.Athena.Widget.get(this).keyPressed(this, event); " +
"return false;"
)
docFactory = loaders.stan (
T.div (
render = T.directive ( 'liveElement' ),
) [
"Blah Text Label",
T.input (
type = "text",
_class = "sw-input",
onkeyup = _js,
),
T.div ( _class = "sw-output" ) [ "Blah More Text" ],
]
)
There are messages in the mailing list (for example, from JP on October 11th
2006) recommending that one should use the athena:handler feature, like this:
<textarea>