1) Checking a return value to programmatically figure out whther the AJAx request succeeded.
2) Directly operating on JSON results from the controller.
The only workaround I could find was to return JSON from my controller code, have RemoteForm "update" an invisible DOM object, then read the contents of that object back into _javascript_ (either using innerHTML, or Mochikit.DOM) and _then_ eval the JSON string.
Surely there must be a better way to do this. Given TG's emphasis on using JSON in AJAX (or AJAJ, if you want to be picky), it seems that there ought to easier to use JSON results directly.
Maybe:
1) reworking the widget to expose the return results directly to _javascript_
2) developing a seperate widget which expects non-html results (JSON, etc.)
Or am I just missing something?
Kevin H.
On 8/14/06, Olli <[EMAIL PROTECTED]> wrote:
hi, I have a little problem about RemoteForm.
from the description of RemoteForm:
A TableForm that submits the data asynchronously and loads the
resulting HTML into a DOM object
so the update element will get the result like "{'test': null}"
but how could I use the result variable at will? like this:
var display = function (result) {
alert(result['test'])
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

