Sounds like a defect to me. Please open a ticket. On Thu, Oct 15, 2009 at 6:41 AM, Tobias Hauth <tobias.ha...@gmail.com>wrote:
> > Hi, > > I want to use 'def ajaxForm(onSubmit: JsCmd, body: NodeSeq)' and > update a hidden fields value on submit with some value. The problem is > that the generated javascript for the onsubmit event first executes > the serialize on the form and then uses my code for onSubmit. > > E.g. ajaxForm(bind("editor", xhtml, "hidden" -> hidden(updateContent > _, "", ("id", "hidden")), "save" -> submit("Save", () => {})), > SetValById("hidden", Str("This should be the content of hidden")))) > > This updates the hidden field value after the submit and updateContent > gets only the old value from the last submit. With a normal form it > works without problems with the update code triggered by onSubmit. > > Is there a way to update the hidden field before transferring its value? > > Thanks, > Tobias > > > > -- 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 -~----------~----~----~----~------~----~------~--~---