function LoadScript(url)
{
var lib = document.createElement(’script’);
lib.type=’text/javascript’;
lib.src= url;
document.getElementsByTagName(’head’)[0].appendChild(s);
}
... or you could use a safer xLoadScript function from the X library.
The X library also provides a xSmartLoadScript function to stop you from loading the same library multiple times.
In a recent post on PeachPit.com, Kris Hadlock gives you a few ideas where this functionality might come handy.
No comments:
Post a Comment