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 Actor. Can i
get it from the scala side to build my own function? I tried
SHtml.ajaxCall to build a function that can send to to the Actor, but
it seems not to work. Any suggestions?

best regards
Martin


On 4 Jan., 13:36, Marius <marius.dan...@gmail.com> wrote:
> 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 =>
>    partialUpdate(Call("foo"))
>
> Call is a JsCmd object from lift witch translates into a JS function
> call. You can also use JsRaw("put here any js code")
>
> You can also do it from render as well like:
>
> def render = {
>    // do something
>    new RenderOut(some_xhtml, Call("foo"))
>
> }
>
> Br's,
> Marius
>
> On Jan 4, 1:30 pm, "martinsema...@googlemail.com"
>
> <martinsema...@googlemail.com> wrote:
> > Hi all
> > if just started exploring Lift and I am playing around with CometActor
> > and Listeneers. I followed Davids Screencast with the Chat Example
> > which works nicely.
> > Now i would like to communicate with the CometActors using my own
> > jQuery code. I don't want to use lifts helpers for that, but want to
> > use my own static JS code.
>
> > How would the send and receive functions look like? Should i disable
> > lifts ajax support or can i plug in somehow?
>
> > I have no clue how to begin. Can someone point to some examples or
> > article that is concerned with this type of stuff?
>
> > thanks in advance!
> > Martin

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to