Friday, March 19, 2021

Javascript, capture load event triggered by Iframe

HTML

BODY id="corp_id"

DIV id= "psdn-slot", containing the IFRAME

IFRAME is created dynamically and the load event is capture with Javascript function.

 

Javascript

 

<script>
document.getElementById("corp_id").addEventListener("load", function()
{
   document.getElementById("psdn-slot").style.bottom= "50px";
}, true);
</script>