I am using this script to dynamically add scripts that loads graph in my page. This code works fine in chrome, Safari and FF but not in IE(!!)..
$.post("shorts.server.php", $.param({
S_number: stocknumber,
}), function(response) {
script = document.createElement('script');
//dynamic_graph.js changes it's content by the current selected stock
script.src = 'jQuery/head/dynamic_graph.js';
$("#graphMain" + id).append(script);
var head = document.getElementsByTagName('body')[0];
script = document.createElement('script');
script.src = 'jQuery/head/dynamic_info.js';
head.appendChild(script);
});
- you can see that I tried both techniques to append the scripts dynamically.
- they both don't work in IE. can you suggest a better way to append the scripts?
1 more less important but related question:
- what is the currect way to post a script in stackoverflow??, because sometimes it's colored and sometimes it's grayed...