On Sat, Nov 7, 2009 at 10:24 PM, Neil.Lv <[email protected]> wrote:
>
> Hi all,
>
> Is there a easy way to write javascript code (dynamic for caculating
> flashvars )in the Snippet ?
>
import net.liftweb._
import http._
import js._
import JsCmds._
import util._
import Helpers._
class MySnippet {
def calcVars(in: NodeSeq): NodeSeq = <head>{
Script(JsRaw(
"var my_var = "+(System.currentTimeMillis.toString.encJs)+";"
))
}</head>
}
>
> To write javascript code directly just like the raw js code and
> merge it into the head tag .
>
> Cheers,
> Neil
> >
>
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---