Thanks again,
what i want to do is some stuff with a canvas element, where changes
are reflected to the other clients. This why i think the SHtml things
do not fit for me. I now think the best way would be to use the
partialUpdate() of the CometActor to send changes to clients and may
be a
Do not disable Lift's ajax.
Let's say you have your own myown.js file having say a function foo().
Now you from a CometActor you want to call this function (assume to
included myown.js in your page head).
When you receive a message in your comet you can call partialUpdate
like:
case MyMessage =
Thanks for that Marius,
it works, but it is only for the server to client direction.
In the generated Html of the ajaxText there is something like:
lift_ajaxHandler('F1162097909104VYK=' + encodeURIComponent
(this.value), null, null)
I guess the F116... is some kind of Id for the receiving
From your render method you can return something like:
ajaxText(Hello, (text) = {
println(text is: + text)
// do something here and return a JsCmd. Thus you can return a JsRaw,
a Call or whatever java script you want
})
F1162097909104VYK has nothing to do with Comet. It is an opaque ID
David,
Yes, I was talking about on updates
Thanks for the solution, it worked well.
With regards,
Mrinal
On Fri, Oct 10, 2008 at 8:56 PM, David Pollak [EMAIL PROTECTED]
wrote:
Mrinal,
Do you mean when the page is initially rendered or do you mean on updates?
If you mean on updates,
Mrinal,
Do you mean when the page is initially rendered or do you mean on updates?
If you mean on updates, see the partialUpdate(js: JsCmd) method on
CometActor:
http://scala-tools.org/mvnsites/liftweb/lift-webkit/scaladocs/net/liftweb/http/CometActor.html
You can send arbitrary JavaScript to