Learning 'dynamic' javascript bookmarklet
- by Seatbelt99
Little help for a javascript noob please...
I have this in a .js file on my web server:
Q=document.selection?document.selection.createRange().text:document.getSelection(); alert(Q);
I highlight some text on a web page (tested with Chrome and firefox) and paste this into the address bar:
javascript:(function(){vara=document.createElement('SCRIPT');a.type='text/javascript';a.src='http://automatethegame.com/js/test.js?';document.getElementsByTagName("head")[0].appendChild(vara)})();
it appears to do nothing. Any assistance or suggestions would be appreciated. thanks