firebug error : no element found

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.

Answers:

Answer

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.

Answer

Setting the mimeType to "text/html" fixed it for me

Answer

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

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.