function include( name, async ) {
async= async || false;
var scripts= document.getElementById( 'scripts' );
var script= document.createElement('script');
script.type= "text/javascript";
scripts.appendChild( script );
try {
//response is XMLHTTPRequest object
script.text= response.responseText;
//instead you can do this:
//script.text= 'some javascript code';
}
catch (e) {
script.src= name; //we need this to display right file name in error
reporting by firebug
}
}
NOTICE!!! you can not set .src and .text simultaneously, because of
script will be executed twice
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/firebug?hl=en
-~----------~----~----~----~------~----~------~--~---