[Lift] Re: Javascript Commands

2009-10-01 Thread Derek Chen-Becker
Oops, sorry about that. Also, can you show a little more of your code? I'm not sure what you're trying to do with the assignment to x. Derek On Thu, Oct 1, 2009 at 10:18 PM, Indrajit Raychaudhuri wrote: > > That should read JsCmds.JsCrVar(...) > > Cheers, Indrajit > > > On 02/10/09 4:39 AM, suna

[Lift] Re: Javascript Commands

2009-10-01 Thread Indrajit Raychaudhuri
That should read JsCmds.JsCrVar(...) Cheers, Indrajit On 02/10/09 4:39 AM, sunanda wrote: > > > Thanks Derek. > But I get the following errors: > found : net.liftweb.http.js.JE.Call > required: java.lang.String > x= JE.Call("foo",2) > ^ > C:\J\BrandNET\eclipse_workspace\GridXml_Lift2.0\src\main

[Lift] Re: Javascript Commands

2009-10-01 Thread sunanda
Thanks Derek. But I get the following errors: found : net.liftweb.http.js.JE.Call required: java.lang.String x= JE.Call("foo",2) ^ C:\J\BrandNET\eclipse_workspace\GridXml_Lift2.0\src\main\scala\net \irisinteractive\lift\grid\snippet\CreateGridConfigTable.scala:47: error: value CrVar is not a memb

[Lift] Re: Javascript Commands

2009-10-01 Thread Derek Chen-Becker
If you have a javascript function "foo(a, b)" where "a" is a String and "b" is an integer then you can call that with JE.Call("foo", "one", 2) for example. If you wanted to set some variable to the result of the function, you could do: JsCmds.CrVar("myVar", JE.Call("foo", "one", 2)) Derek On

[Lift] Re: Javascript Commands

2009-09-30 Thread sunanda
Hi David, Thanks for your prompt reply. As a beginner I have started reading the book "Exploring Lift". It says "If you need to write large portions of JavaScript code for your pages, we recommend writing that code in pure JavaScript in an external file and then including that file in your pages

[Lift] Re: Javascript Commands

2009-09-30 Thread David Pollak
See http://demo.liftweb.net/ajax Specifically: var cnt = 0def doClicker(text: NodeSeq) = a(() => {cnt = cnt + 1; SetHtml(spanName, Text( cnt.toString))}, text) It increments a counter. On Wed, Sep 30, 2009 at 4:50 PM, sunanda wrote: > > Hi, > I am totally new to lift framework. > Can a