Hi developers, today I encountered one error which works fine in Mozilla Firefox but giving an error in IE (Internet Explorer). In IE, the error which I encountered is “Error: Invalid source HTML for this operation “, when I run the same application in Firefox, it renders properly without any warnings or errors in the JavaScript console.
I wondered why IE will raise an issue when I could not see any error in Firefox? annoying error right? Yes! same thing I feel.
After searching a lot in Google by this query “Error: Invalid source HTML for this operation“, I got the answer by seeing some forums. This Error might be because of “Inserting a block element inside a non-block element”
like for example: document.getElementById(‘inserting’).innerHTML=”<span><div>Inserting a block element inside a non-block element</div></span>”
The above is strictly not allowed in IE6.0 browsers. When you render the same in IE browser will raise an error saying the same “Error: Invalid source HTML for this operation“, when you render the same in Firefox browsers then will render properly without any error
You can view the below links for reference:
innerHTML and non-block elements
http://xinha.webfactional.com/ticket/129
Related Topics which you would like to read:
1. System Error: -1072896658 in IE
2. Snippet Code for Simple Ajax Tabs with cool CSS Styles
3. Using XMLHttpRequest, reading XML data (Adobe AIR Application)
4. Remove special characters (like !, >, ?, ., # etc.,) from a string using JavaScript
5. 10 different styles of Accordions (Using Ajax, JavaScript, DHTML)
Related Entries...
When I am running my Ajax web application, the application is rendering properly in Mozilla Firefox b ...
Just think what Google Chrome would return when we run browser detection code written in JavaScript ? ...
Here is a simple snippet on adding a "div" to the body tag dynamically using JavaScript, after going ...
Taffy DB, which is well known JavaScript database for your browser, and which is a free and opensourc ...
I am back again with some good snippet on "Placing a Play Icon over the image using CSS", After going ...
Hey folks over there, here I came up with simple Ajax Tabs, you guys can show case your valuable cont ...
Introduction Recently, one of my reader came up with a query like "Why JavaScript is not running aft ...
In the following article we can have a look at the ways of creating new files in Ruby programming lan ...
As we all know AJAX is rocking the Web World all around, just I had a thought to developer a simple A ...
Hi Guys, I would like to share a JavaScript snippet code which will remove special characters (like ! ...




















5 Responses
[...] Original post by admin [...]
[...] Original post by admin [...]
[...] Browser Detection Code Snippet 4. Netscape is the ‘navigator.appName’ for Google Chrome 5. Error: Invalid source HTML for this operation 6. System Error: -1072896658 in [...]
[...] Detection Code Snippet 7. Netscape is the ‘navigator.appName’ for Google Chrome 8. Error: Invalid source HTML for this operation 9. System Error: -1072896658 in IE 10. Simple steps to develop AJAX Website – [...]
don’t give same ID more than 1 time (don’t repeat same ID) in side a form