How can I put javascript in an a-href attribute in a WordPress blog post?

I’ve created a javascript bookmarklet and I’m trying to write a blog post about it on a WordPress blog. I would like readers to be able to drag a link from the post to their bookmark toolbar to save the bookmarklet. However, when I create a link with the bookmarklet code in the "href" attribute, it does not save properly.

I gather WordPress is finicky about including javascript in posts.

How can I put javascript code into an href attribute of an "a" tag in a WordPress post?
I’m using WordPress 2.0.4 and I’m not using the visual rich editor.


Comments

One Response to “How can I put javascript in an a-href attribute in a WordPress blog post?”

  1. Jake Cigar on August 6th, 2010 3:46 pm

    I don’t know wordpress, but I do know bookmarklets!

    I just code them as <a href="javascript:…">

    it gets long, but that’s their nature!

    What does you bookmarklet do?

Powered by Yahoo! Answers