OK, having more issues with this.

First I tried changing to jsonCall. This results in a huge backtrace, 
which I don't have at hand ATM but which seems to indicate a parse error 
in the input string. Strange, as the input seems rather 
straight-forward, but I thought I'd ensure that I'm not handing the 
function garbage before claiming that it's broken. Only, I can't seem to 
figure that out either.  Here's what I've got:

   def updatePosition(pos:String):JsCmd = {
     println("Got "+pos)
     Alert(pos)
   }

   def update(in:NodeSeq):NodeSeq = Script(JsRaw("""
     loc.onUpdate = function(lat, lon) {
       """+SHtml.ajaxCall(JsObj("lat" -> JsVar("lat"), "lon" -> 
JsVar("lon")), updatePosition _)._2.toJsCmd+""";
     }"""))

The generated JS looks fine:

     <script  type="text/javascript">
//<![CDATA[

     loc.onUpdate = function(lat, lon) {
       liftAjax.lift_ajaxHandler('F41567931874MRB=' + {"lat": lat, "lon": lon}, 
null, null, null);
     };
// ]]>
</script>


But the println shows that I'm getting handed "[object Object]". 
Shouldn't it be passed a JSON string?


--~--~---------~--~----~------------~-------~--~----~
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