Hi,

I'm not sure if this behavior already exists via some other mechanism,
but I wanted an ajaxForm that executed a JsCmd sent from the sever
after submit.  Here it is:

        def ajaxForm(body: NodeSeq,func: ()=>JsCmd) = {
          val id = Helpers.nextFuncName

          fmapFunc(func)(name => <form action="javascript://" id={id}
onsubmit={makeAjaxCall(LiftRules.jsArtifacts.serialize(id)).toJsCmd+";
return false;"}> <input type="hidden" name={name} value="true"/> {body}
</form>)
        }

Is there a better way?  jsonForms seemed like a bit of overkill to do
what i wanted=> simple update of div after submit.

- Jon
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to