Notifications
Clear all

[Closed] cannot set properties of null (setting)

3 Posts
2 Users
0 Reactions
780 Views
Posts: 2
Topic starter
(@sunman4008)
New Member
Joined: 2 years ago

Hello

 

Everything was fine and now I am getting this all of a sudden on the onload...

 

 am getting error here all of a sudden all on the iframe onload

// Adjusting the iframe height onload event
            iframe.onload = function(){
                    iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
                    iScannerContent.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
            }


2 Replies
Posts: 2
Topic starter
(@sunman4008)
New Member
Joined: 2 years ago

</div></div></div></div></div><div class="thrv_wrapper tve_wp_shortcode" data-css="tve-u-16aa289f28a" style="height: 9958px;" id="ScannerContent"><div class="tve_shortcode_raw" style="display: none"></div><div class="tve_shortcode_rendered"><p><script>
// Selecting the iframe element
var iframe = document.getElementById("my-iframe");
var iScannerContent = document.getElementById("ScannerContent");

// Adjusting the iframe height onload event
iframe.onload = function(){
iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
iScannerContent.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
}

</script></p>

TinyWebGallery
Posts: 924
Admin
(@admin)
Prominent Member
Joined: 16 years ago

Hi,

the code above is not from advanced iframe plugin. 

Are you using this code in parallel? 

Best regards, 

Michael