views:

39

answers:

1
<script>
    $("#tableview").css({'display' : block});
    $("#tableview").append('{{html}}');  
    or
    $("#tableview").html('{{html}}');
</script>

<div id="tableview" style="display:none;"></div>

the {{html}} i.e, generated on the server gets displayed which is,<div id=""newdiv">contetssdddddddd</div>.This is displayed on the UI

how to embed the html in the body

+2  A: 

use {{ html|escapejs }} with append()

read this

Gabi Purcaru