Saturday, June 30, 2012

Re: javascript in django template not executed when request is sent via ajax

If your web server is in fact serving the content with the incorrect Content-Type header (You can verify this by inspecting the response in the Net tab of Firebug or Chrome) jQuery can convert the response regardless of the content-type if you specify a two space-separated values in your dataType. Try dataType: "text html" in your $.ajax function.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/XB_Q1y7lXlQJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment