I have a bookmarklet which a user can add to their browser, simple code:
javascript:(function(){ListIt=document.createElement('script');ListIt.src='http://***.com/js/list_it/feed.js';document.body.appendChild(ListIt);})();void(0);
I also want to have a button which a user can add to their own site and so want to do the same as above but onclick, but what I’m trying simply does nothing
Here’s what I’m trying:
<a href="#" onclick="(javascript:(function(){ListIt=document.createElement('script');ListIt.src='http://***.com/js/list_it/feed.js';document.body.appendChild(ListIt);})();void(0);)"><img src="http://***.com/images_/icons/list-it-button.png" border="0" title="List It!"></a>
1 Answer