Closed jonathonadler closed 13 years ago
What version of dajax do you have? Check the last commit. http://github.com/jorgebastida/django-dajax/blob/master/src/prototype.dajax.core.js#L6 If there is any exception in the server alert once and go away.
The current jquery.dajax.core.js works fine Upgrade your copy and it should work.
thank you!
I'm still seeing this issue with jquery on 0.8.4. Looking at the source, it doesn't seem fixed...
Thinking about this more, following the JavaScript gracefully degradation philosophy wouldn't it be better to simply hide this message entirely except when in a debugging mode? I usually see this message when there is an error in my Django view which Dajax tries to interrupt as a JavaScript command. On most browsers this creates and endless series of "Invalid Action" alerts that effectively crashes the browser since it is impossible to escape from this loop. When this happens, my site is unusable. A better result would be to simple ignore the error which should be logged by Django anyway. This would be the same effect as if the user visited the site with JavaScript disabled and allow the site to continue function in most cases if it is following a degrade gracefully design. Thoughts?
Thank you very much for your comments.
Finally I've removed the alert message, it doesn't help in any way under development or not.
https://github.com/jorgebastida/django-dajax/commit/ef959ad3889d774b86ef89b1903788fefa86ea8f
This changes will be released asap
When an error occurs it is generally unrecoverable, however an error message is repeated over and over on the client. I sugest adding the return statement below: