Hi,
I would suggest to use the jQuery framework in order to accomplish this.
I use it myself and it's proven both effective and compatible.
Simply download jQuery (I'd suggest the minified version) from http://jquery.com.
Then, on your website, just put this snippet of code:
Code:
<script type="text/javascript" src="jquery_1_2_6.js"></script>
... replace 'jquery_1_2_6.js' by whatever name you call your jQuery file.
I'd suggest putting this code at the end of page, i.e.:
Code:
<script type="text/javascript" src="jquery_1_2_6.js"></script>
</body>
Then, you can call your external JavaScript file like this:
Code:
$.getScript('external.js', function(data) {
alert('This message is shown when the file has been successfully loaded.');
});
Hope this helps.
Cyber
Bookmarks