Scott has recently championed these underused tools for one’s browser toolbar, rightfully so, because they are very handy, bordering on indispensible.
I had toyed with this a year ago, especially since I end up posting about 80% of the new items to our
bag of urls but never finished.
But now I have, and it was very easy indeed to build a bookmarklet tool that shortens the steps for dropping a url into the bag
There are handy ones for metric conversion and such, but you can also write scripts that can extract information from the curent web page in view and use it in a web form.
This is essentially what the MovableTyoe Bookmarklet tool does for weblog authors- when I find a web site I wish to blog about, one click of this tool, and it pops up a small browser windiw with a mini blog editing form… and here is the kicker- it prepopulates the title of the site and builds a basic hypertext link using the information passed by the bookmarklet script. It can even grab a chunk of text that may be hilited on the browser screen.
Let’s take a look at the bookmarklet code:
You access the document properties via d=document and from there you can extract strings for the title and url. The “escape” fuinctions encodes the text content to a URL friendly format
So the bookmarklet grbas this data, opens a new window, and loads it with a URL to a PHP script that appends the data in a format PHP can read and then echo back into the form.
Very handy indeed, as well as handy to know a bit more of how bookmarklet code works. Get your bag dropping bookmarklet today and send us some new stuff!
The post "Bag Dropping Bookmarklet" was originally slapped on the butt by a cigar smoking doctor yelling "It's a post!" at CogDogBlog (http://cogdogblog.com/2003/07/bag-dropping/) on July 22, 2003.