InnerHTML is an easy way to insert data or elements to page WWW, unfortunately, it is not included in the standards of encoding pages, what can cause unexpected behavior.
If you want to party complies with the standards, you must use
removeChild to editing elements on page.
After adding tags to page www using
innerHTML, this makes the disorder hierarchy of DOM, what can cause that it will not be possible to register the events. In some case else code may work correctly but can cause a lot of damage to page.
Example of error after adding tag to page using
innerHTML. If you add div tag to page using
document.getElementById([idElem]).innerHTML, it may not be possible registered events by
In the newly created scripts use
appendChild, do modifying older scripts and testing.