I recently learned of a technically inclined user who wrote “macros” to streamline data entry into a complex enterprise Web application. My initial reaction was: “There are no macros in Internet Explorer so how did he hook into the page?” It turned out that he was using something called a Bookmarklet. I don’t know how I managed to never hear about them for all these years, but I could immediately envision a myriad of uses for them. In today’s article, I’ll explain what they are, how they work, and how to use them to automatically fill out and submit a form one time or a thousand times over!
What is a Bookmarklet?
Let’s start with what a bookmark is. It’s just a link to a Web resource that usually begins with the “http:”, “file:”, or “ftp:” protocol. There is another special prefix that browsers recognize: “javascript:”. It tells the browser to execute everything that comes after as JavaScript code. You can try it yourself in a hyperlink like so:
<a href="javascript: alert('Howdy ho!');">Try this out!</a>