Bibhaw
Bibhaw

Reputation: 497

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.

Upvotes: 4

Views: 10329

Answers (3)

Sadiq Malik
Sadiq Malik

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

mimo
mimo

Reputation: 937

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

Upvotes: 2

Quentin
Quentin

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

Related Questions