Lance, my problem is that it doesn't compile when I try "mvn jetty:run" there is a compile error.
On Jul 23, 5:04 pm, Lance Zheng <lanc...@gmail.com> wrote: > haha, see my post > herehttps://groups.google.com/group/liftweb/browse_thread/thread/3a848144... > > "submit" -> <button type="button" onclick={ajaxCall(JsRaw("$ > ('#whoField').attr > ('value')"), updateWho _)._2}>{?("send")}</button> > > and > > "submit" -> <button type="button" onclick={ajaxCall(JqId(Str > ("whoField")) >> JqGetAttr("value"), updateWho _)._2}>{?("send")}</ > button> > > can work in IE8. > > but in Firefox3.5, it can't get "whoField" value out. Maybe it's a > JQuery problem(liftweb 1.0, jquery1.3.2 build in)? > > On Jul 23, 9:22 pm, Dorinel <dorinel.munte...@gmail.com> wrote: > > > > > But I've stubled upon another bug when tried to implement the form > > with Ajax: > > > import scala.xml.NodeSeq > > import net.liftweb.http.S._ > > import net.liftweb.http.SHtml._ > > import net.liftweb.util.Helpers._ > > import net.liftweb.http.js.{JsCmd, JsCmds} > > > class HelloFormAjax { > > def whoNode(str: String) = <span id="who">{str}</span> > > > def updateWho(str: String): JsCmd = { > > println("updateWho on " + str) > > JsCmds.Run("$('#who').text('"+str+"')") > > } > > > def show(xhtml: NodeSeq): NodeSeq = { > > bind("hello", xhtml, > > "whoField" -> text("world", null) % ("size" -> "10") % ("id" -> > > "whoField"), > > > "submit" -> <button type="button">{?("Send")}</button> % > > ("onclick" -> ajaxCall("$('#whoField').attr('value')", s => updateWho > > (s))), > > "who" -> whoNode("world") > > ) > > } > > > } > > > I'm getting this bug: > > use java command with args in file forced : false > > /home/dorin/work/scala/hello-lift/src/main/scala/net/liftweb/hello/ > > snippet/HelloFormAjax.scala:20: error: wrong number of arguments for > > method ajaxCall: (net.liftweb.http.js.JsExp,(String) => > > net.liftweb.http.js.JsCmd)(String, net.liftweb.http.js.JsExp) > > "submit" -> <button type="button">{?("Send")}</button> % > > ("onclick" -> ajaxCall(JsExp("$('#whoField').attr('value')", s => > > updateWho(s)))), --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---