Hi, > I'm aware of that method, but I want a callback to find out what > content type was loaded, display it if text/html or execute it if text/ > javascript.
$('<script src="http://example.com/myscript.js" type="text/javascript">'). appendTo('head'); $('<script type="text/javascript">callMyCallback</script>'). appendTo('head'); Since the second tag will be inserted after the first, it will be executed after the first script is loaded and executed. Well, you don't get the content Type, but you can check for the existance of variables or functions that should be in the script. That at least tells you if the script has been loaded successfully as javascript. Christof