Forums

Discuss all things Remember The Milk.

Using the mobile Add as a generic Quick Add tool including all fields

raymond.bergmark Power Poster says:
Try this (sorry for the long link but it has all the fields except location and list) http://m.rememberthemilk.com/add?name=Take%20over%20the%20world&priority=2&due=tomorrow&repeat=every%20week&estimate=8%20h&tags=rule&url=www.dn.se to get this:

Host unlimited photos at slide.com for FREE!

The /add used in the mobile version has all the fields you want, better to use that instead of the Quick Add tool. By saving this page it's quite easy to add all the functionality you want including defaults, list boxes instead of text boxes etc.
Posted at 9:40pm on November 7, 2007
raymond.bergmark Power Poster says:
Here is the Firefox+Internet Explorer (maybe it works for other browsers too) javascript for the bookmarklet above (replace "#" with "javascript" followed by a ":"):

#(function(){h='m.rememberthemilk.com';p='/add';if(window.getSelection){t=window.getSelection();}else if(document.getSelection){t=document.getSelection();}else if(document.selection){t=document.selection.createRange().text;}; cp='http://'+h+p+'?name='+t; w=window.open(cp,'addwindow','status=no,toolbar=no,width=200,height=560,resizable=yes'); setTimeout(function(){w.focus();}, 500);})();

Create a toolbar button and paste all text above into "address". If you select some text before using the button the task field gets filled with that text.

In my humble opinion this bookmarklet works better than the RTM one as it allows setting all the fields in one go in one place. It's even easier than adding tasks directly at the site as things are added at different places there.

Love RTM though, just the adding tasks part needs improving ;-)
Posted 16 years ago
raymond.bergmark Power Poster says:
Easier: pull this link into the bookmarks area:

Add to RTM!

Edit the button (right-click it, choose Properties) and replace the "http://www.rememberthemilk.com/forums/tips/3133/#" in the beginning of the adress with "javascript" followed by a ":"
Posted 16 years ago
raymond.bergmark Power Poster says:
I have modified this Quick Add page a bit in order to have default values and list boxes to choose from. You can find it at my homepage.

However, you'll need to modify two things before you can use it (or modify it further):
1 Have it to choose from your lists
2 Have it to choose from your locations

You can find this (and as a matter of fact even copy the code) by viewing the source code from this page.

I would suggest that you then create a bookmark that uses your version of this page. Easiest way is probably to modify the javascript above. Unfortunately I haven't managed to get the select-text-in-advance-part to work yet.

Host unlimited photos at slide.com for FREE!
Posted 16 years ago
rubyji says:
Thanks, this works great!
Posted 16 years ago
raymond.bergmark Power Poster says:
Glad you like!
Posted 16 years ago
jmdurant says:
anyway to get the URL automatcally entered?
Posted 16 years ago
raymond.bergmark Power Poster says:
Add '+&url='+location.href to the java_script:

java_script: (function(){h='m.rememberthemilk.com';p='/add';if(window.getSelection){t=window.getSelection();}else if(document.getSelection){t=document.getSelection();}else if(document.selection){t=document.selection.createRange().text;}; cp='http://'+h+p+'?name='+t'+&url='+location.href; w=window.open(cp,'addwindow','status=no,toolbar=no,width=200,height=560,resizable=yes'); setTimeout(function(){w.focus();}, 500);})();

(Remove the "_" in java_script)

As for fixing this in the html file above, I didn't succeed. Java_script is more flexible.
Posted 16 years ago
(closed account) says:
Great tip!

How can I have the task line to be focused, so I only have to start tyoing when the window pops up? That is, like for the official quick add tool.

Now the window pops up, but then loses focus, so I have to click the window, then the input box for the task name. Small thing, but kinda troublesome in the long run.

Btw, when I add the code to add the URL the popup window doesn't open. Nothing happens when I click the toolbar button...

Tack rajjan! :)
Posted 16 years ago
raymond.bergmark Power Poster says:
Sorry, the ' before the URL is in the wrong place (java_script is rather picky ;-)

java_script: (function(){h='m.rememberthemilk.com';p='/add';if(window.getSelection){t=window.getSelection();}else if(document.getSelection){t=document.getSelection();}else if(document.selection){t=document.selection.createRange().text;}; cp='http://'+h+p+'?name='+t+'&url='+location.href; w=window.open(cp,'addwindow','status=no,toolbar=no,width=200,height=560,resizable=yes'); setTimeout(function(){w.focus();}, 500);})();

(Remove the "_" in java_script)

As for getting focus, I really don't know, I know very little java_script. Maybe someone else has a solution?

Lycka till westis!
Posted 16 years ago
(closed account) says:
this bookmarklet requires me to log in to the mobile site before I can add a task. RTM's incomplete bookmarklet posts to the main RTM site. Is there a way to use this revised bookmarklet on the main site, so I don't have to log in to the mobile site?
Posted 16 years ago
cliod says:
That is very clever, Rajjan! Thanks!!

Posted 16 years ago
raymond.bergmark Power Poster says:
tmech: If you log into the mobile site you will remain logged-in for quite some time (weeks). Unless that's a problem (shared computer for example) you only need to log in once in a while.
Posted 16 years ago
fourtwoseven says:
Thank you Thank you Raiijan! This is a lifesaver!
Posted 15 years ago
raymond.bergmark Power Poster says:
Glad I saved your life ;-)
Posted 15 years ago
tafkaj says:
This is really helpful! It's also a good idea to escape the URL so that complex URLs (such as URLs to specific messages in Gmail) aren't chopped short: just replace +location.href with +escape(location.href);
Posted 15 years ago
lcompean says:
I do but I don't understand what you guys did.. probably cause I just fell into the HTML scripting wagon. This is a pop up possibly a widget-like thing -does it direct to my account automatically if I open up a RTF page and then copy the Web page address and place the address in href area? I think I get that much but can you go alittle further and highlight an example of what the string I'm looking for looks like too? like a before and after.

It's for desktop versions only?- I'd copy this to a text doc and save as a html right so I can open in a browser page by clicking the icon right?

Sorry~ not afraid to crash my computer... just rather not do it itf I don't have to...thanks guys!
Posted 15 years ago
lcompean says:
Okay I got it and added a couple more drop downs but one thing still escapes me-- I can't get the notes section to show up correctly... did anyone else get that cut and paste script done correctly? Pls, pls pls, post it, thanks!
Posted 15 years ago
bay879 says:
Thanks, Rajjan!!!

I dusted off my java_script, and figured out how you can auto-fill the form, and took care of some of the other requests above (focus on the task name) so now everything seems to work pretty well and neatly.

Whether adding a web item or not, I find this solution preferable to using the RTM interface -- I can easily pop it up this window no matter what page I'm on whenever I think of a task. For this reason, I've actually created two pages, "addNew" (add a general task) and "addThis" (add specific info from this web page). The below relates to "addThis":

Note to all: as discussed above, you must host your own "addThis" web page for this all to work, but there are plenty of free places on the web that you could do that. I've tested everything in FireFox 3.0. Other browsers may not work.

First, my "ADD_THIS to RTM" java_script in my bookmarks tool bar uses the selected text as the due date, the page title as task name, and URL as url:

java_script:(function(){h='www.myServer.com';p='/myDirectory/addThis.html';if(window.getSelection){d=window.getSelection();}else%20if(document.getSelection){d=document.getSelection();}else%20if(document.selection){d=document.selection.createRange().text;};cp='http://'+h+p+'?due='+encodeURIComponent(d)+'&name='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href);w=window.open(cp,'addwindow','status=no,toolbar=no,width=250,height=560,resizable=yes');setTimeout(function(){w.focus();},500);})();

(Remove the "_" in java_script)

Now the HTML page - I've added a "name" to the form to be able to address its elements easily, and I've added java_script at the end of the page that reads the variables from the URL (the script above will actually request "addThis.html?url=TheURL&name=pageTitle&due=selected_text). Demo file can be found at:

http://www.4shared.com/file/65287306/cee76d4a/demo-addThis.html


My general "ADD_NEW to RTM" bookmark script doesn't pull any info off the page, and my html page doesn't have java_script to set the fields automatically, so I just get a blank slate to fill in. Whereas on my addThis page I have a few tags that I use for web items in a drop-down, addNew just has an empty text box. But it's basically the same, just pared down a bit.

The addNew java_script is
java_script:(function(){h='www.myServer.com';p='/myDirectory/addNew.html';cp='http://'+h+p;w=window.open(cp,'addwindow','status=no,toolbar=no,width=250,height=560,resizable=yes');setTimeout(function(){w.focus();},500);})();

(again, remove the "_" in java_script)

Posted 15 years ago
bay879 says:
Here is a demo file. The free web host adds some of their own junk into the html, so the link in the prior post above is useful for getting the actual HTML file, but this suffices as an example.

The javascipt: (You can just pull this link into the bookmarks area)

Demo Add_This to RTM

Edit the bookmark button (right-click it, choose Properties) and replace the "http://www.rememberthemilk.com/forums/tips/3133/#" in the beginning of the address with "javascript" followed by a ":"

It won't actually add tasks to your list, because you need to add your own list IDs in the HTML (see post above dated 6:29am on November 8, 2007)
Posted 15 years ago
ryankennedy says:
One more version of the bookmarklet:

- uses the mobile version of the UI
- uses browser's current URL in the new task's URL field
- if you have selected text, uses that as the task name, otherwise it uses the Page Title

java_script:(function(){h='m.rememberthemilk.com';p='/add';if(window.getSelection){t=window.getSelection();}else%20if(document.getSelection){t=document.getSelection();}else%20if(document.selection){t=document.selection.createRange().text;};cp='http://'+h+p+'?name='+((null==t||t==""||t==undefined)?encodeURIComponent(document.title):t)+'&url='+encodeURIComponent(location.href);w=window.open(cp,'addwindow','status=no,toolbar=no,width=250,height=560,resizable=yes');setTimeout(function(){w.focus();},500);})();

NOTE: remove the "_" in java_script
Posted 15 years ago
thegoodlife says:
Thanks ryankennedy
That is awesome dude.
Posted 15 years ago
slamp says:
Thanks for this bookmarklet
Posted 14 years ago
rileycentral says:
There is some awesome stuff to play with here. Thanks for posting it.
Posted 14 years ago
sailesh says:
Thanks to rajjan and ryankennedy - exactly what I was looking for!!
Posted 14 years ago
rileycentral says:
Did anyone ever find out how to get the "Notes" entry to show up in the marklet?
Posted 14 years ago
andrewski (Remember The Milk) says:
I'm returning to this page for the second time (to share this bookmarklet with a friend) and I just wanted to say thanks for the few iterations of this bookmarklet!

It may sound silly, but I've all but replaced my todo tag in Delicious/Firefox with actual tasks. It's great to have everything I need to do in one place, regardless of medium. :)
Posted 14 years ago
leah.shalom Power Poster says:
Thanks to all for the bookmarklet - it is almost as good as having Quicksilver on the pc.
Posted 14 years ago
raymond.bergmark Power Poster says:
Thanks to bay879 and ryankennedy for adding the final touches to the javascript, it's now perfect! Let's see when RTM updates their Quick Add bookmarklet ;-)
Posted 14 years ago
tomvanbraeckel says:
Useful tip, thanks !
Posted 14 years ago
(closed account) says:
frankly, the main contributors deserve a free pro membership... only ryankennedy doent have one, though. thanks all, this is great!
Posted 14 years ago
batman697 says:
Is there any way to add auto complete on the tags in these bookmarklets?
Posted 14 years ago
andrewski (Remember The Milk) says:
I don't think autocomplete works at all on the mobile site, but I've noticed that Firefox's autocomplete works for tags I've previously added to other tasks.
Posted 14 years ago
batman697 says:
Thanks for the info
Posted 14 years ago
(closed account) says:
Two questions about ryankennedy's code.

1) How can I change the default list from Inbox?
2) Is it possible to have the window close after hitting the 'Add Task' button?
Posted 14 years ago
andrewski (Remember The Milk) says:
hakeemshabazz,
1. I assume it's based on the Inbox being your default list. What if you change that on the Lists tab of your Settings?
2. Not currently; it simply uses the mobile interface (which doesn't do that).
Posted 14 years ago
(closed account) says:
Thank you. I wonder why the RTM team hasn't incorporated everyone's hard work into an official update to their bookmarklet (that doesn't use the mobile login)?
Posted 14 years ago
benb says:
Great tweak to the bookmarklet.
I want to have the name field focus, but don't want to bother hosting my own version of the page. Can anyone tell me why this doesn't work (the name field is the first instance of an input element on the page).

java_script:(function(){h='m.rememberthemilk.com';p='/add';if(window.getSelection){t=window.getSelection();}else%20if(document.getSelection){t=document.getSelection();}else%20if(document.selection){t=document.selection.createRange().text;};cp='http://'+h+p+'?name='+((null==t||t==""||t==undefined)?encodeURIComponent(document.title):t)+'&url='+encodeURIComponent(location.href);w=window.open(cp,'addwindow','status=no,toolbar=no,width=250,height=560,resizable=yes');setTimeout(function(){w.focus();document.getElementsByTagName('input')[0].focus();},500);})();
Posted 14 years ago
edwardfrench says:
I didn't find this thread when I searched, so re-invented the wheel!
however the version I've made here works as a local html file which then pre-populates an email using the mailto: tag, that way it goes into your outbox and so works offline too.

http://ensemb.li/4c

It works a treat on Google Chrome, with IE I think you might need to mess with the security settings a bit
Posted 14 years ago
benb says:
Any JavaScript people out there who can tell me what's wrong with my script above?
Posted 14 years ago
(closed account) says:
@benb:
I'm not a JS-Guru, so just a guess:

document.getElementsByTagName('input')[0].focus();},500);})();

This refers to the current page, not the popup.
I guess you have to address your popup, something like window.addwindow.getElementsByTagName('input')[0].focus()
(Not tested!)

But I would not be surprised if current browsers do not allow to access elements of one popup from another one with JS, because it could be used to do bad stuff...
Posted 13 years ago
tim.visher says:
So many props for this!
Posted 13 years ago
btait1 says:
Fantastic - exactly what I was looking for!

Can anyone explain this error?


NTUxYzM4NjU


Posted 13 years ago
btait1 says:
Meh - here is a link to the image.

http://screencast.com/t/NTUxYzM4NjU
Posted 13 years ago
raymond.bergmark Power Poster says:
Could you post your java_script here so we can try it out?
Posted 13 years ago
btait1 says:
Thanks for the response Rajjan!

javascript:(function(){h='m.rememberthemilk.com';p='/add';if(window.getSelection){t=window.getSelection();}else if(document.getSelection){t=document.getSelection();}else if(document.selection){t=document.selection.createRange().text;}; cp='http://'+h+p+'?name='+t+'&url='+location.href; w=window.open(cp,'addwindow','status=no,toolbar=no,width=200,height=560,resizable=yes'); setTimeout(function(){w.focus();}, 500);})();
Posted 13 years ago
raymond.bergmark Power Poster says:
Works perfectly for me in Firefox 3.6. Tried it in IE7 too, works there too.

Below is a test to see if RTM removes the text java_script
javascript: test
javascript:test
Posted 13 years ago
btait1 says:
Thanks Rajjan! I should have mentioned. I am on a Mac using Chrome.
Posted 13 years ago
andrewski (Remember The Milk) says:
rajjan,
Seems like we couldn't get that one past you. ;) (The changes we made on the forums also changed our text/code parsing.)
Posted 13 years ago
bgrolleman says:
Works fine in Firefox, but for some reason it breaks on https sites in Google Chrome, anybody have any idea why?

java_script:(function(){h='m.rememberthemilk.com';p='/add';if(window.getSelection){t=window.getSelection();}else%20if(document.getSelection){t=document.getSelection();}else%20if(document.selection){t=document.selection.createRange().text;};cp='http://'+h+p+'?name='+((null==t||t==""||t==undefined)?encodeURIComponent(document.title):t)+'&url='+encodeURIComponent(location.href);w=window.open(cp,'addwindow','status=no,toolbar=no,width=250,height=560,resizable=yes');setTimeout(function(){w.focus();},500);})();
Posted 12 years ago
jamesr404 says:
Wow, this is fantastic ^^
Posted 12 years ago
raymond.bergmark Power Poster says:
@bgrolleman: Did you try it on the RTM site? I doesn't work there either for me in Chrome, but other pages work.
Posted 12 years ago
espacerencontre says:
Here is my code. The task name is the text selected in page before you click or if null the page name

javascript:(function(){if (window.getSelection){txt = window.getSelection();}else if (document.getSelection){txt = document.getSelection();}else if (document.selection){txt = document.selection.createRange().text;}else return;if (txt ==''){txt=document.title;}else{txt=txt;};h='m.rememberthemilk.com';p='/add?name=' + txt + '&url=' + location.href;if(window.getSelection){t=window.getSelection();}else if(document.getSelection){t=document.getSelection();}else if(document.selection){t=document.selection.createRange().text;}; cp='http://'+h+p+'?name='+t; w=window.open(cp,'addwindow','status=no,toolbar=no,width=200,height=560,resizable=yes'); setTimeout(function(){w.focus();}, 500);})();

Hope help someone.
Posted 12 years ago
espacerencontre says:
Oouups. The right code:
javascript:(function(){if (window.getSelection){txt = window.getSelection();}else if (document.getSelection){txt = document.getSelection();}else if (document.selection){txt = document.selection.createRange().text;}else return;if (txt ==''){txt=document.title;}else{txt=txt;};h='m.rememberthemilk.com';p='/add?name=' + txt + '&url=' + location.href;
cp='http://'+h+p; w=window.open(cp,'addwindow','status=no,toolbar=no,width=200,height=560,resizable=yes'); setTimeout(function(){w.focus();}, 500);})();
Posted 12 years ago
dsteele says:
None of these work for me (Firefox 3.6.27 on Windows, behind a proxy). The popup always asks for authentication, then opens a blank form.
Posted 11 years ago
bgoodr says:
I came up with an alternative bookmarklet that uses a Gmail compose window instead of the standard bookmarklet. Find it described at http://bgoodr.blogspot.com/2012/10/gmail-rtm-bookmarklet.html

This allows me to add the URL into the field, but also allows me to type in additional notes to be attached to the task to create. Alas, it does not provide auto-completion for tags.
Posted 11 years ago
axehandle says:
How many years have people been trying to work around this? RTM: Just add support for a hidden URL field in the normal QuickAdd tool. That way interested parties can add the "&URL=" bit to their bookmarklet without disrupting the existing flow.
Posted 11 years ago
cobrastyle says:
bgoodr:

This is a terrific variation on the bookmarklet, which has been giving me problems lately. Just wanted to say thanks for writing it up.
Posted 11 years ago
(closed account) says:
The bookmarklets are awesome and also work fine in Chrome. Is it possible to select a default list from the bookmarklet? I mainly use the bookmarklet to add articles to a 'read later' list, which I know have to select everytime I click the button. Thanks.
Posted 10 years ago
mickeypr says:
Hi, are you having any issues using the bookmarklet on Gmail with Firefox?

For some reason the bookmarklet window does not show up when I click it.

Thanks,

Mickey
Posted 6 years ago
raymond.bergmark Power Poster says:
krvermeulen: Late answer, but adding a list number solves your problem:

javascript:(function(){h='m.rememberthemilk.com';p='/add';if(window.getSelection){t=window.getSelection();}else if(document.getSelection){t=document.getSelection();}else if(document.selection){t=document.selection.createRange().text;};cp='https://'+h+p+'?name='+((null==t||t==""||t==undefined)?encodeURIComponent(document.title):t)+'&list=999999'+'&url='+encodeURIComponent(location.href);w=window.open(cp,'addwindow','status=no,toolbar=no,width=250,height=580,resizable=yes');setTimeout(function(){w.focus();},500);})();

Replace 999999 with the correct list number.
Posted 6 years ago
erikts says:
Unfortunately the bookmarklet does not work in Opera (my preferred browser). Task name and URL is empty. Thanks for sharing @raymond.bergmark
Posted 6 years ago
raymond.bergmark Power Poster says:
Sorry to hear that @erikts. Unfortunately, I know close to nothing about javascript, hopefully there are others here that can help.
Posted 6 years ago
emily (Remember The Milk) says:
Just a heads up for anyone who might still be using this tip... the mobile version at m.rememberthemilk.com is going to be discontinued on June 1, 2018.

The mobile version was launched way back in May 2006 (before Android or iOS existed!) as a way to access Remember The Milk on your phone. As we now have mobile apps for multiple platforms, the mobile version is no longer serving its original purpose (though we know it's being used in a few bookmarklets like this!).

If you're looking for a way to quickly add tasks from the desktop, we recommend using the Smart Add on the desktop feature, which will let you add tasks quickly from anywhere with a customizable keyboard shortcut.
Posted 5 years ago
raymond.bergmark Power Poster says:
Sorry to see this go, thought I have to admit it's been quite some time since I used it last.
Posted 5 years ago
timrray says:
The bookmarklet was very useful and there is no other way to quickly add a website as a task that I'm aware of using RTM. How else are we supposed to do this now within a web browser, which has to be one of the most frequently used RTM client options?
Posted 5 years ago
jimjoh says:
Emily, I appreciate the heads up. However, the desktop app doesn't seem like a comparable replacement. A bookmarklet can with one click add a web page's title and URL as a task (which is how I add the majority of my tasks). With the desk top app I'll now need to (at a minimum):
1. Start the desktop app
2. Manually type in the name of the task
3. Copy the URL from my browser
4. Paste in the URL from my browser

My bookmarklet also automatically sets the date to today which is correct about half the time for me, so that's another thing I'll need to manually set which I frequently didn't need to set before.

Are there any plans to restore the easy browser based task add functionality?
Posted 5 years ago
raymond.bergmark Power Poster says:
Any chance that a API-savvy person could create a new Quick Add that works like the bookmarklet above, with all fields?

Task, List, Priority, Start, Due, Repeat, Estimate, Tags, Location, URL and Notes.

Preferably, the Task/Notes would be the selected text and the URL would be the present page.
Posted 5 years ago
martingchapman says:
+1 for this
"jimjoh says:
Emily, I appreciate the heads up. However, the desktop app doesn't seem like a comparable replacement. A bookmarklet can with one click add a web page's title and URL as a task (which is how I add the majority of my tasks). With the desk top app I'll now need to (at a minimum):
1. Start the desktop app
2. Manually type in the name of the task
3. Copy the URL from my browser
4. Paste in the URL from my browser

My bookmarklet also automatically sets the date to today which is correct about half the time for me, so that's another thing I'll need to manually set which I frequently didn't need to set before.

Are there any plans to restore the easy browser based task add functionality?"

@emily
Can you answer this post please.
Also, why do RTM not see this functionality as important, so many people want it and many other ToDo services already include it!
Posted 5 years ago
martingchapman says:
+1 for this;
"raymond.bergmark Power Poster says:
Any chance that a API-savvy person could create a new Quick Add that works like the bookmarklet above, with all fields?

Task, List, Priority, Start, Due, Repeat, Estimate, Tags, Location, URL and Notes.

Preferably, the Task/Notes would be the selected text and the URL would be the present page."
Posted 5 years ago
martingchapman says:
For ideas on how to easily add tasks from a chrome web page or gmail see this RTM tip;
https://www.rememberthemilk.com/forums/tips/22832/
Posted 5 years ago
bradparks says:
I just started using RTM, and love it - but thought the bookmarklet area was lacking.

Here's a web page that details how to save the current page using a bookmarklet, via the mobile app, and using a Gmail link:

https://github.com/bradparks/remember_the_milk_tools

Posted 3 years ago
Log in to post a reply.