Reputation: 497
1 client : send request to server via AJAX fn.
2 Server : response in form of text/xml
and it works correctly only 1 or 2 times
response.setContentType("text/xml");
3 but only after 1/2 request, i get error in browser (firebug) and it says No element found
client : javascript jQuery ajax
server : java servlet
can somebody give any tips to sort out.
Upvotes: 4
Views: 10329
Reputation: 1
Put a semicolon at the end of your jquery function for example I had a function
$(document).on("change", "#myid", function() {})
changed to
$(document).on("change", "#myid", function() {});
worked for me
Upvotes: 0
Reputation: 944568
can somebody give any tips to sort out.
Look at the HTTP traffic. Figure out if the problem is because of a broken request or a broken response. That will tell you if you need to investigate the server side or the client side code.
Upvotes: 3