On Mon, Nov 2, 2009 at 4:06 PM, sunanda <sunanda.pa...@gmail.com> wrote:
> > Hi, > I need to refresh a session variable to empty string on load of a > page and need to set the variable to some string (e.g. "abcd") on > click of a button. How can I do this. > import net.liftweb.http._ object MySessionVar extends SessionVar("") class MySnippet { def render: NodeSeq = { MySessionVar.set("") SHtml.ajaxButton("Press Me", () => {MySessionVar.set("abcd"); js.JsCmds.Noop}) } } > Sunanda. > > > > -- 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 liftweb@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 -~----------~----~----~----~------~----~------~--~---