Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

akvaskov's avatar

Execute js script loaded dynamicly

Hello! I have a page which loads and shows content dynamicly. Say I have 2 buttons. One loads just regular html generated on the server side and the second one loads a ChartJS. I use Laravel ChartJS lib. And here I kave a problem. I can see in the console that ChartJS dom elements rendered and there is a respective script but it's not executed because, as I understand, it's loaded via ajax. Any ideas how to make this script run after loading? Many thanks in advance!

0 likes
3 replies
akvaskov's avatar

One more comment: script is loaded inside of canvas tag...

Please or to participate in this conversation.