views:

73

answers:

1

I have a commenting tool that can be included on a page simply by adding a script tag to the <head>. This works fine, and I've made a Greasemonky script and Firefox plugin that do just that, and putting it manually on a site works fine too. However I'm trying to make a bookmarklet:

javascript:(function(){var%20ormeo=document.createElement('script');
ormeo.src='http://www.ormeo.net/js/ormeoStart.js';
ormeo.type='text/javascript';
document.getElementsByTagName('body')[0].appendChild(ormeo);})();

...and this doensn't work (on Firefox 3.5). Any ideas why? Other bookmarklets that do the same thing, add a <script> tag to the <head> work fine, why not mine?

A: 

Try adding the script tag to the head instead of the body:

document.getElementsByTagName('head')[0].appendChild(ormeo);})();
Luca Matteis
oops, I am, that was something else I was trying that still doesn't work...