0

I have following script tag

<script src="http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=rsb&c=28&pli=3326580&PluID=0&w=728&h=90&ord=|RANDOM|&ncu=$$|CLICK|$$"></script>
<noscript>
    <a href="|CLICK|http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=brd&FlightID=3326580&Page=&PluID=0&Pos=4688" target="_blank">
        <img src="http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=bsr&FlightID=3326580&Page=&PluID=0&Pos=4688" border=0 width=728 height=90>
    </a>
</noscript>

This is executing when, I am simply adding to a html body segments.

But its not executing if I am adding this tag to a html element dynamically with jquery.

I also tried to convert it to dom using jQuery('') before appending to the html element.

Please see my jQuery code which, I am doing to execute this.

var testUrl = $('<script src="http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=rsb&c=28&pli=3326580&PluID=0&w=728&h=90&ord=|RANDOM|&ncu=$$|CLICK|$$"></script><noscript><a href="|CLICK|http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=brd&FlightID=3326580&Page=&PluID=0&Pos=4688" target="_blank"><img src="http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=bsr&FlightID=3326580&Page=&PluID=0&Pos=4688" border=0 width=728 height=90></a></noscript>');
$('#previewImgDiv').html(testUrl);

Can anyone please help me out?

Anujith
  • 9,370
  • 6
  • 33
  • 48
user519846
  • 999
  • 7
  • 15
  • 26

1 Answers1

0

you can do this by using postscribe.that is specially for Asynchronously write javascript

Bharat
  • 1
  • 1