Adam Yee schrieb:
> On Jun 17, 3:45 pm, "Diez B. Roggisch" <[email protected]> wrote:
>
>> Try attaching the onsubmit-action directly without the connect. And
>> don't forget to return "false" from it, to prevent actual form-submission.
>
> onsubmit is working in the form, but connect still doesn't.
Try getting a reference to the form by different means - explicit
beforehand, either via $(), or via document.forms[0] or something, to
see if you really get the proper object to bind the handrel to.
>> If that's helping, attach it using connect, and don't forget to call
>> "stop()" on the passed event.
>
> stop() prevents the browser from asking if I want to save 'insert' as
> a json file.
I don't understand that. I thought the connect isn't working?
>
>> Also, use FireBug to see if your JS-functions are actually called.
>>
>> Diez
>
> Now getting the response from handleServerError:
>
> MochiKit.Async.XMLHttpRequestError("Request failed")
>
> Am I using loadJSONDoc correctly? How does it pass the json to my
> insert() controller and then decode with json.loads()?
There is no json passed. The values are passed as "normal"
http-form-encoded values.
What happens if you put an
import pdb; pdb.set_trace()
into the insert()-action, is that reached?
Diez
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---