Possible Solution
Hi fellow programmers!
I am writing to you to request some help on a problem that I recently experienced. The problem itself is this:
1) I have an ajax request implemented using jQuery.
2) After returning a successful script response, you should reload the page with the appropriate changes and, if there are any validation errors, insert them after the hidden field used to store non-critical different data. If there are validation errors, the changes are not saved, and the page simply reloads with validation error messages. The check itself is checked by the servlet.
3) I noticed that everything works fine when some kind of alert () is presented before actually adding error messages, but I do not want to have such a warning.
Here is the JavaScript code:
$('#randomFormElement').submit(function() { $(this).ajaxSubmit({ success: function (data, status) { randomFunctionToReloadThePage(arg1, arg2, arg3); var errors = $(data).find('.classNameOfTheErrors').xml();
So, the main question: what deal with alert () makes it work?
============================
On Chrome, this does not work.
In FF, it only works if there is some warning ().
Thanks in advance!
javascript jquery ajax
Aleksander Panayotov
source share