I would simply use Shtml.ajaxText. When you press ENTER an ajax
request is sent tothe server and your function would be called with th
value you typed in.
Br's,
Marius
On May 3, 11:44 am, Meredith Gregory wrote:
> Marius,
>
> Thanks! That works much better. One final question, if i wanted to ha
Marius,
Thanks! That works much better. One final question, if i wanted to have the
CR/LF event on the textbox have the same behavior as the button, what would
be the simplest approach? Currently, i have
{ text(evalStr(), (updateWhat _)) % ("size" -> "60") % ("id" -> "whatField")
}
which always
Oh and one question out of curiosity with your approach even if you
see the old value in the firebug widow do you still get the od value
on the text on server side?
On May 3, 11:08 am, "marius d." wrote:
> First of all instead of:
>
> ("onclick" -> ajaxCall(JsRaw("$('#whatField').attr('value')"
First of all instead of:
("onclick" -> ajaxCall(JsRaw("$('#whatField').attr('value')"), s =>
updateWhat(s))._2)
I would use:
("onclick" -> ajaxCall(ValById("whatField"), s => updateWhat(s))._2)
That should work I think in your case you are setting the value
attribute of the text field
Marius, et al,
Put another way, what is the minimal code that will allow me to associate to
the button click calling updateWhat with the string that is currently
sitting in the textbox?
Best wishes,
--greg
On Sun, May 3, 2009 at 12:51 AM, Meredith Gregory
wrote:
> Marius,
>
> Thanks for the ti
Marius,
Thanks for the tip! That gets me a little further. However, what i really
don't understand is why it is that after i have modified the textbox from
"lambda x.x" to "lambda x.(x x)", then when i type
$('#whatField').attr('value') in the javascript evaluation window in firebug
it's returning
Greg,
ajaxCall returns a tuple (String, JsExp) ... so when you use it try
something like:
("onclick" -> ajaxCall(JsRaw("$('#whatField').attr('value')"), s =>
updateWhat(s))._2)
Br's,
Marius
On May 3, 9:00 am, Meredith Gregory wrote:
> Lifted,
>
> When i look at the button behavior using fire
Lifted,
When i look at the button behavior using firebug, this is the following
error i see.
F891109765602PT1 is not defined
onclick(click clientX=950, clientY=152)1tbfBLwe...6bg%3D%3D (line 2)
(F891109765602PT1, lift_ajaxHand...whatField").attr("value"), null, null));
It would appear that howev