Pull-Down Menu (Preferably Nonmodal) in Javascript Bookmarklet?
December 29, 2008 2:10 PM   RSS feed for this thread Subscribe

Is the presentation of a choose-item-from-multiple-choices-presented menu possible to implement into a Javascript bookmarklet?

Ideally, I would be looking for the menu to act in the same nonmodal fashion like "prompt" does in a Javascript bookmarklet. (If you don't know what I mean by that, click on the text "Find in this page" on this webpage.)

I currently have a bookmarklet that takes the webpage that I'm currently on, and funnels it into a task on Remember the Milk. The bookmarklet right now is:

popw=window.open('http://m.rememberthemilk.com/add?name=' + escape("Web: Check out \"") + escape(document.title) + escape("\".") + '&list=[list ID]&priority=&repeat=&estimate&tags=' + escape("@web rtmurl") + '&priority=2&url=' + escape(location.href) + '&add=' + escape('\"Add Form\"'), 'taskForm','scrollbars=yes,width=680,height=510,top=175,left=75,status=no,resizable=yes');if (!document.all) T = setTimeout('popw.focus()',50);void(0);

Essentially, I would like to trigger the bookmarklet, and be presented with a multiple-choice menu appears where I'm presented with choices. The text of the choice will go into the "tags" section of the URL; it'll let me do further sorting.

This seems to be simple enough, but there's enough stuff out there with similar wording that I can't seem to pin myself right down to this.
posted by WCityMike to computers & internet (3 comments total)
It wouldn't be in an alert box, and you'd have to do some serious tweaking to your script, but what about the Lightbox JS derivative ThickBox? Check out the inline content modal demo for starters.
posted by niles at 3:20 PM on December 29, 2008


Seconding niles, this is a great use for one of the thousands of lightbox type popups.

And the approach to take is to have the bookmarklet insert a script tag at the bottom of the document. That script tag goes and grabs the remote javascript. That way you don't have to shove everything in the tiny bookmarklet size.
posted by cschneid at 3:44 PM on December 29, 2008


Thanks, guys. Since it looked as if the coding was going to be far more complicated, I modified the workflow ... I created variants of the bookmarklet for each new tag, then let the "menu" be a bookmark folder in my bookmark toolbar. Not what I ideally wanted, but far less work invested on my end. :-)
posted by WCityMike at 10:16 PM on December 29, 2008


« Older My friend has a Linux laptop, ...   |   San Francisco filter: What fu... Newer »

You are not logged in, either login or create an account to post comments