Form not loading at all on ajax call

Hi there,
I found i small problem on the automatic form loading.

I have a popup on my website that i am loading with the form automatic code (something like this):

<script type="text/javascript" src="//domain.com/form/generate.js?id=8"></script>

It seems that as long i load the code like that it’s not working and i can’t load the form.
The other option i have is using iframe but then it’s harder to edit the css.

At the time i load the form manually but i rather load the dynamic code.

Does anyone have an idea on how to make it work?
Thanks