jquery - Append text in html <script></script> tag. Javascript issue -


i want add text span container on runtime calling javascript function html node :

<span class="muted">    <script>        //here want add string returned outer span. (i use jinja tags)         getgenericobjname("{{n.news_type}}",{{n.news.object_id}});    </script> </span> 

the reason because iterate on news feed. , know function returns correct value.

i tried use document.write(...) seems override whole page.

thanks!

do other way round, via js (using jquery):

<script type="text/javascript">     $(".muted").html(getgenericobjname("{{n.news_type}}",{{n.news.object_id}})); </script> 

html:

<span class="muted"></span> 

Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -