I would like to know the reason for the following problem:
In a web application (JSP) I use javascript to make changes in the HTML and requests (AJAX) (GET method) to the server, the problem is that when I make the request to the Servlet, it returns an HTML to me, which is inserted into an HTML div with the innerHTML property. Then I want to work with the HTML elements that I just inserted in the document but the changes are not reflected, for example, the servlet returns an HTML with a list of inputs type checkbox, with javascript paste that response inside a div (with innerHTML) and then I would like to manipulate (check or uncheck) the checkboxes but they do not uncheck, nevertheless if I clean the javascript code with firefox the code works, that is to say everything is marked / unchecked, I HAVE THE PRINTING as if javascript delayed a second more in pasting he HTML code in the document and therefore the marked or unmarked does not work. I'd like to know what this is about, I really do not know why.
NOTE: This only happens with servlet HTML responses;
- THANKS