I'm wading into an area that I'm a bit unfamiliar with and not sure if
I'm running in a bug.

Snippet code:
class HelloWorld {
  def ajaxFunc1() : JsCmd = JsRaw("alert('Button1 clicked')")

  def ajaxFunc2(str: String) : JsCmd = {
    Log.info("Received" + str)
    JsRaw("alert('Button2 clicked')")

  def renderAjaxButtons(xhtml: NodeSeq): NodeSeq = {
    bind("ex", xhtml,
      "button1" -> SHtml.ajaxButton("Press Me", ajaxFunc1 _),
      "button2" -> <button>Press Me 2</button> % ("onclick" ->
SHtml.ajaxCall(Str("Button-2"), ajaxFunc2 _)))

Which is in this template:
    <ex:button1 /><br />
    <ex:button2 /><br />

And is rendered thusly:
  <button onclick="lift_ajaxHandler('F687305521434PIG=true', null,
null); return false;">Press Me</button><br />

    <button onclick="(F687305521435R3K,lift_ajaxHandler
('F687305521435R3K=' + 'Button-2', null, null))">Press Me 2</
button><br />

Button 1 is find, but Button 2 causes FireBug to whine:
F687305521435R3K is not defined
onclick(click clientX=500, clientY=239)2 (line 2)
[Break on this error] F687305521435R3K,
lift_ajaxHandl...F687305521435R3K=Button-2", null, null);

Does the second onclick look incorrect to you?

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 
For more options, visit this group at 

Reply via email to