Friday, October 27, 2006

Prompting in Bookmarklets

Jon Udell's Library Lookup project was my introduction to Bookmarklets. That was a year or so ago and I have used bookmarklets here and there, but I haven't needed to prompt for anything in the past. The good news is, that prompting for parameters in the bookmarklet is even easier than pulling data from within the current page.

The bookmarklet that I needed today was for looking up Perforce changelist details:

javascript:{var changelist=prompt('Enter Changelist','');if(changelist)location.href='http://secretInternalPerforceHost/describe.php?change='+changelist;}


Good stuff.

No comments: