php - how to get javascript code as a responce and set in div from ajax page? -


i want facebook comments box, getting ajax page in response. when data coming ajax, alerting it. showing in alert box, when trying set in div, it's not setting properly.

here piece of code in want set in div ajax page.

<div id="fb-root"></div>     <script>(function(d, s, id) {       var js, fjs = d.getelementsbytagname(s)[0];       if (d.getelementbyid(id)) return;       js = d.createelement(s); js.id = id;       js.src = "//connect.facebook.net/en_us/all.js#xfbml=1";       fjs.parentnode.insertbefore(js, fjs);     }(document, 'script', 'facebook-jssdk'));</script>      <div class="fb-comments" data-href="https://www.facebook.com/video/embed?video_id=23423424242" data-width="470"></div>   

why not setting in div?

assign ajax response div this

$('#your_div').html(response); 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -