How to load a javascript function via string
<div id="test_div">display here</div> // < --display here
<script type="text/javascript">
// string
var _script=("<script type=\"text/javascript\">
var disqus_shortname = 'example';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>");
// write/output the string
document.getElementById('test_div').innerHTML= _script;
</script>