I have small issue - I'm making ajax query to transfer data to another php file and once query success I need to load one script.
$.ajax({
type: 'POST',
url: 'promote.php',
data: { country:country },
success: function() {
//What to do here?
}
});
The script is:
<script type="text/javascript">
var var1 = "d1dtGWhrOaxxUVCy%2FNjJwkpd9lCj%2FGijAGXS5d7LYPU%3D";
var var2 = "jn9drdklwlr5hjYc2eHTCaXRjdpHDqhaqL5LXpsyc54%3D";
var var3 = "E770DuKV8GKaHhaZO%2B%2F9sPzUI9mAUFVRrxRTH75pHvA%3D";
var var4 = "LhWNAMH8CgveH%2FqRHKxqg8ebEVZKTX4pQw3pp5wTRl8%3D";
var network = "xxxxxxx";
</script>
<script type="text/javascript" src="http://xxxxxxx/js/xx.js"></script>
So any suggestions how could I load this script when ajax query success? I need to do that in in this file, please don't suggest putting script in other file and loading from it. Would that be possible?