0

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

1
  • You simply want to run the code within the <script> tags within the success call back on the get() function ? Commented Jul 5, 2012 at 12:32

1 Answer 1

1

If you are fetching JavaScript from the server,use getScript()

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.