scref.setAttribute('type', 'text/javascript')
scref.setAttribute('src', 'http://d3js.org/d3.v3.min.js')
document.getElementById('parentDiv').appendChild(scref)
Dynamically adding div element from html encoded string containing Div and Script markup