Bookmarklets: The Bookmarklet Builder - www.docjavascript.com | WebReference

Bookmarklets: The Bookmarklet Builder - www.docjavascript.com


The Bookmarklet Builder

Writing a bookmarklet is a bit frustrating. First, you need to create a temporary page with the desired javascript: link, so you can create a bookmark for that link. Furthermore, you can only use one type of quotes, due to quote alternation.

In order to make the process easier, we created a handy utility that assists you in the process of creating bookmarklets. We won't discuss the script that powers the Bookmarklet Builder, because it's beyond the scope of this column. We'll just show you how to take advantage of it. Before we start, load the Bookmarklet Builder. We suggest that you create a bookmarklet for the Bookmarklet Builder, by making a bookmark for the preceding link.

Now take a look at the Bookmarklet Builder. Enter the desired one-line javascript: URL in the first field, and the name of the bookmarklet in the second one. Then hit the Update button and notice the new link. Simply create a bookmark out of that link, and your bookmarklet is ready. Note that you will need a fourth generation browser for the Bookmarklet Builder, because it utilizes Dynamic HTML.

We created the Bookmarklet Builder in a special way that enables you to use both single and double quotes freely, as you would in any normal script. You don't need to worry about the quotes in the link's HREF attribute.

http://www.internet.com

Produced by Yehuda Shiran and Tomer Shiran

Created: February 1, 1999
Revised: February 1, 1999

URL: http://www.webreference.com/js/column35/automatic.html