Thank you Jeppe, It's great. On Oct 31, 3:28 am, Jeppe Nejsum Madsen <[email protected]> wrote: > Xuefeng Wu <[email protected]> writes: > > I want call function on the server side form client. > > such as: > > HTML client: > > $.("#myLink").click(function{ > > //call server function > > }); > > > Server side: > > def myFunction() :JsCmd = { > > JsRaw("alert("Ah~ you could call me from client directly!")") > > } > > It looks like you want a link ( <a/> tag) that, when clicked makes an > ajax call: > > bind("select", in, "link" -> a(myFunction _, Text("My link"))) > > If you need to generate the javascript precisely as written above (ie it > is triggered by something not in Lift), I think you can use this: > > JqJE.Jq(JE.Str("#mylink")) >> > JqJE.JqClick(JE.AnonFunc(ajaxCall(JE.Str("hey"), myFunction _)._2)) > > /Jeppe
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
