Also, dojo evals the result properly if the type is application/json.
But turbogears returns content-type text/javascript...

On Aug 20, 11:13 am, Eric Snow <[EMAIL PROTECTED]> wrote:
> I am using dojo for my client side.  When I send an rpc request it
> matches the response format to the content-type header.  For text/
> javascript it simply evals it.  I am using tgws, but I am pretty sure
> that the content-type and formatting are handled in straight
> turbogears.
>
> If I send tg_format as json then it will return the appropriate
> javascript object in the response.  However, the content-type is set
> to text/javascript.  So dojo tries to eval the result.  I get the
> "invalid label" error since it tries to eval the result as a code
> block instead of an object.
>
> To resolve this either the content-type needs to be different, the
> response needs to be wrapped in parentheses, or the handler that dojo
> uses for that content-type needs to change.  Any ideas on configuring
> turbogears to resolve this conflict?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to