Learn Photoshop, Flash, Adobe AIR, ExtJS, jQuery, Ajax, Dojo, HTML, CSS, JavaScript, XML, Accessibility, Database, DWR, Gears, GWT, Java, JSON, MooTools, Office, Perl, PHP, Programming, Prototype, Scriptaculous and more

Want to explore your choice of video from all over world at once place! then what are you waiting for, just click, explore and learn.

Tech Video Bytes

Error: Invalid source HTML for this operation

Categories: HTML, Internet Explorer, JavaScript, Mozilla
Tags: , ,
Written By: admin

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)

4 Responses to “Error: Invalid source HTML for this operation”

  1. Error: Invalid source HTML for this operation Says:

    [...] Original post by admin [...]

  2. ezineaerticles » Blog Archive » Error: Invalid source HTML for this operation Says:

    [...] Original post by admin [...]

  3. Placing a Play Icon over the image using CSS | developersnippets.com Says:

    [...] 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 [...]

  4. Code Snippet of handling files in Ruby Programming Language | developersnippets.com Says:

    [...] 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 – [...]

Leave a Reply

Featured & Popular Articles