Apologies for the noise.
The correct usage is, thanks to dpp:
"button2" -> Press Me 2 %
("onclick" -> SHtml.ajaxCall(Str("Button-2"), ajaxFunc2 _)._2)
The branch is gone.
On Apr 1, 2:05 pm, David Pollak wrote:
> Tyler,
>
> This call is malformed:
> "button2" -> Press Me 2 % ("onclick" ->
Tyler,
This call is malformed:
"button2" -> Press Me 2 % ("onclick" ->
SHtml.ajaxCall(Str("Button-2"), ajaxFunc2 _)))
SHtml.ajaxCall returns a (String, JsCmd). The String is absolutely
necessary (it will be actually) for GC).
The call is doing the right thing and should not be patched.
At
On Apr 1, 5:59 pm, TylerWeir wrote:
> Rewriting ajaxCall_* to incorporate Vik's idea fixes this:
>
> private def ajaxCall_*(jsCalcValue: JsExp, func: AFuncHolder):
> (String, JsExp) = {
> val (n, r) = fmapFunc(func)(name =>
> (name, makeAjaxCall(JsRaw("'"+name+"=' +
> "+jsCalcValu
I pushed code to SHtml.scala to fix ajaxCall and ajaxInvoke.
It's here: http://github.com/dpp/liftweb/tree/tjweir-shtml-js-fix
On Apr 1, 10:59 am, TylerWeir wrote:
> Rewriting ajaxCall_* to incorporate Vik's idea fixes this:
>
> private def ajaxCall_*(jsCalcValue: JsExp, func: AFuncHolder):
Rewriting ajaxCall_* to incorporate Vik's idea fixes this:
private def ajaxCall_*(jsCalcValue: JsExp, func: AFuncHolder):
(String, JsExp) = {
val (n, r) = fmapFunc(func)(name =>
(name, makeAjaxCall(JsRaw("'"+name+"=' +
"+jsCalcValue.toJsCmd
("'" + n + "'", r)
}
Thanks.
Excellent, thanks Derek, Vik, I'm back on this today.
On Apr 1, 9:03 am, Viktor Klang wrote:
> On Wed, Apr 1, 2009 at 2:55 PM, Derek Chen-Becker
> wrote:
>
> > It looks like it's missing a function call. Compare
>
> > onclick="lift_ajaxHandler(...
>
> > to
>
> > onclick="(F687305521435R3K,lif
On Wed, Apr 1, 2009 at 2:55 PM, Derek Chen-Becker wrote:
> It looks like it's missing a function call. Compare
>
> onclick="lift_ajaxHandler(...
>
> to
>
> onclick="(F687305521435R3K,lift_ajaxHandler
>
> I'm no JS guru, so that second one might be perfectly valid JS, but it
> looks weird to me.
It looks like it's missing a function call. Compare
onclick="lift_ajaxHandler(...
to
onclick="(F687305521435R3K,lift_ajaxHandler
I'm no JS guru, so that second one might be perfectly valid JS, but it looks
weird to me.
Derek
On Tue, Mar 31, 2009 at 9:57 AM, TylerWeir wrote:
>
> I'm wading i