I'm not exactly sure how best to phrase my question, so I'll start by explaining what I am trying to do.
I have a page that has some code similar to a Google Analytics pixel code. Something like this:
<div id="mydiv"></div>
<script src="blahblah.php"></script>
The PHP script returns some javascript that will insert another snippet into the div.
The code that is inserted into the div is basically another instance of the above. Should work the exact same way.
So up to this point it should look like this:
<div id="mydiv">
<div id="mydiv2"></div>
<script src="blahblah2.php"></script>
</div>
<script src="blahblah.php"></script>
Everything works fine through the 2nd external script call (blahblah2.php), as in it retrieves the contents of that script, but does not execute it. If I execute that script directly I can see that it works. I'm wondering if it is some kind of security issue with having some external code call some other external code? Is this not something that is doable?