Currently I am trying to use JavaScript within greasemonkey to dynamically
put a menu at the top of each page. I am running in to trouble when I try
to append a node representing a script tag to the header section. It ends
up not adding anything to the document. I am currently getting no errors
from the javascript panel in firefox. Here is the code I am using:
HeadTag = document.getEle mentsByTagName( "head");
var scriptElement = document.create Element('script ');
if (scriptElement) {
scriptElement.t ype = 'text/javascript';
scriptElement.i d = 'addedscript';
HeadTag[0].appendChild(sc riptElement);
}
Please let me know if I am doing something wrong or if i need to add more to
this code. Also, how do I then add the javascript code to the newly created
node? Thanks for the help.
Joseph Scoccimaro
gt*****@mail.ga tech.edu