Possible Duplicate:
How can I get the content of the file specified as the ‘src’ of a <script> tag?
I want to print my "definition" of script, preventing it will be executed.
Tried with :
var scriptWidget = document.createElement('script');
scriptWidget.type = 'text/javascript';
scriptWidget.src = "http://www.mywebsite.it/file.js";
$('#widget-html-codici').html(escape(scriptWidget));
but it prints %5Bobject%20HTMLScriptElement%5D
.
How can I print the code as "code"?