i want run same js code after ajax response.
js code is
<script>
var wid = 2670, gid = 8412;
var rpHost = (("https:" == document.location.protocol) ? "https://" : "http://");
var tt = "t_reklamporttakip_Kozmetik_1x1_Uye_Takip";
var ciid = 4541454;
document.write(unescape("%3Cscript src='" + rpHost + "ad.reklamport.com/scripts/rpn.js' type='text/javascript'%3E%3C/script%3E"));
document.write(unescape("%3Cscript src='" + rpHost + "ad.reklamport.com/rpgetad.ashx?tt=" + tt + "&ciid=" + ciid + "&rnd=" + Math.random() % 99999999 + "' %3E%3C/script%3E"));
</script>
how to i run this code some as
jQuery.get('url', function(response){
// i want run here!
});
Any suggestions from anyone
asked Jul 5, 2012 at 12:29
alioygur
5,4745 gold badges38 silver badges37 bronze badges
1 Answer 1
If you are fetching JavaScript from the server,use getScript()
answered Jul 5, 2012 at 12:49
epascarello
208k20 gold badges206 silver badges246 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-js
<script>tags within the success call back on theget()function ?