Sorry, spoke to soon. I got it, thanks.

On Dec 18, 4:27 pm, Peter Robinett <[email protected]> wrote:
> Unfortunately there is no change. Firebug shows that the POST reply
> was empty.
>
> Peter
>
> On Dec 18, 3:26 pm, David Pollak <[email protected]>
> wrote:
>
>
>
> > On Fri, Dec 18, 2009 at 3:22 PM, Peter Robinett 
> > <[email protected]>wrote:
>
> > > Hi all,
>
> > > I think there is a simple answer to this, but I'm a little confused. I
> > > want to update a bound element when my Ajax form is submitted. Here's
> > > a simple version based upon what I gleaned from the wiki and the
> > > mailing list:
>
> > > <lift:Test.form>
> > >  <p>Display: <test:display /></p>
> > >  <p>Input1: <test:input1 /></p>
> > >  <p>Input2: <test:input2 /></p>
> > >  <p><test:submit /></p>
> > > </lift:Test.form>
>
> > > class Test {
> > >  var display = ""
> > >  var input1 = ""
> > >  var input2 = ""
> > >  def form(xhtml: NodeSeq): NodeSeq = {
> > >    SHtml.ajaxForm(
> > >      bind("test", xhtml,
> > >        "display" -> <span id="i_like_yaks">{display}</span>,
> > >        "input1" -> SHtml.text(input1, input1 = _),
> > >        "input2" -> SHtml.text(input2, input2 = _),
> > >        "submit" -> SHtml.submit("Submit", () => {}) // empty method
> > > since our hidden item will be called instead?
> > >      ) ++
> > >      SHtml.hidden(() => {
> > >       display = input1 + input2
>
> > SetHtml("i_like_yaks", Text(display))
>
> > >      })
> > >    )
> > >  }
> > > }
>
> > > Am I on the right track? How do I actually get <test:display /> to be
> > > updated?
>
> > > Thanks,
> > > Peter
>
> > > --
>
> > > 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]<liftweb%[email protected]
> > >  >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/liftweb?hl=en.
>
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://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.


Reply via email to