Does iFrame have any events suitable for when a JavaScript & HTML page are embedded in modal(Bootstrap)

đź‘Ť:0

Yes you can do it, hope you have embedded jQuery library, as you’re using bootstrap you should include jQuery script library in the page(using jQuery is more standardized and best approach).

Let us say you’re opening the model from button with id=”btnShowModal”, using jQuery you can run the function upon clicking of the button as below:

$("#btnShowModal").click(function(){
   //here you can add the code what ever you want to execute on button  
   window.myRadar = new   Chart(document.getElementById("canvas").getContext("2d")).Radar(radarChartData,{responsive: true});
});

Leave a comment