Javascript : Modifying parent element from child block the web site to display

Well recently i was working with Dotnetnuke and we are using lots of JavaScript around this project. Internally, dotnetnuke use lot of asp.net user control which lead to have a situation where child element accessing/modifying data of parent.

Here is one example  

the DIV element is a child container element. The SCRIPT block inside the DIV element tries to modify the BODY element. The BODY element is the unclosed parent container of the DIV element.

   1:  <html>
   2:    <body>
   3:        <div>
   4:                    <script type="text/Javascript">
   5:                      document.body.innerHTML+="sample text";
   6:                    </script>
   7:        </div>
   8:    </body>
   9:  </html>

This is by Design,so, upgrade to latest IE :)

For more information
Why do I receive an "Operation aborted" error message when I visit a Web page in Internet Explorer?
http://support.microsoft.com/kb/927917

Thanks,

Suresh Behera

No Comments