Javascript in a wordpress post
how can I add <a href="javascript:function foo(){alert('hi');}" title="alert"> Drag to your bookmarks bar </a> in my wordpress post. I have built a bookmarklet and i want to pass it through my blog. But wordpress is stripping out the javascript from my post when it displays it. I have no issues embedding that code in the HTML editor on my wordpress site. There is a problem with your javascript code- that defines a function, but never calls it. I have <a href="javascript:alert('hi');" title="alert">Drag to your bookmarks bar</a> in a post, and I get the alert when click, as well as the