0

I am getting this error when I click on view code option in HTML container to view the code of the page which is present in iframe. First time it is showing but after saving if you go again to same page this error occurs in this code.

this.get_html = function()
{
    var html;
    if($("#" + d.id).is(":visible"))
    {
        html = $("#" + d.id).val();
    }
    else
    {
        html = d.iframe.contentWindow.document.body.innerHTML;
    }
    if(typeof getXHTML === 'function')
    {
        return getXHTML(html);
    }
    else
    {
        return html;
    }
Siguza
  • 21,155
  • 6
  • 52
  • 89
  • I'd say that means that there is an iframe with no content in your page, and that internet exploder chokes on it – Jaromanda X Jul 27 '15 at 06:30
  • methinks in SO need add question like [What is a NullReferenceException and how do I fix it?](http://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it) for javascript too :-) – Grundy Jul 27 '15 at 06:39
  • second time also Contents coming in iframe but when i try to view code for that page its trough error. – Niyaz Khanapure Jul 27 '15 at 07:02
  • possible duplicate of [Why is iframe.contentWindow == null?](http://stackoverflow.com/questions/12199797/why-is-iframe-contentwindow-null) – Grundy Jul 27 '15 at 07:38

0 Answers0