I recently started updating my site to send and receive requests / responses through AJAX. I am using a prototype library.
My existing HTML code contains certain imgand tags inputthat are not closed.
When I try to update the content of an element (say div) with such HTML code using the innerHTML property, I get parsing errors such as "unwanted code" or "malformed", etc.
Without using AJAX, i.e. without dynamically updating the DOM, the page functions normally even using non-standard html coding.
Question:
Is there a way to use dynamic updating and still avoid parsing errors?
imdad
source
share