Bienvenue !  Français Language Switcher

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

raymond.bergmark ProPower 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 ProPower 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 6 years ago

raymond.bergmark ProPower 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 6 years ago

raymond.bergmark ProPower 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 6 years ago

rubyji says:

Thanks, this works great!

Posted 6 years ago

raymond.bergmark ProPower Poster says:

Glad you like!

Posted 6 years ago

jmdurant says:

anyway to get the URL automatcally entered?

Posted 6 years ago

raymond.bergmark ProPower 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 6 years ago

westis 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 6 years ago

raymond.bergmark ProPower 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 6 years ago

tmech 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 6 years ago

cliod says:

That is very clever, Rajjan! Thanks!!

Posted 6 years ago

raymond.bergmark ProPower 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 6 years ago

fourtwoseven says:

Thank you Thank you Raiijan! This is a lifesaver!

Posted 6 years ago

raymond.bergmark ProPower Poster says:

Glad I saved your life ;-)

Posted 6 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 6 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 6 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 6 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 6 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 6 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 5 years ago

thegoodlife says:

Thanks ryankennedy
That is awesome dude.

Posted 5 years ago

slamp says:

Thanks for this bookmarklet

Posted 5 years ago

rileycentral Pro says:

There is some awesome stuff to play with here. Thanks for posting it.

Posted 5 years ago

sailesh says:

Thanks to rajjan and ryankennedy - exactly what I was looking for!!

Posted 5 years ago

rileycentral Pro says:

Did anyone ever find out how to get the "Notes" entry to show up in the marklet?

Posted 5 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 5 years ago

leah.shalomPower Poster says:

Thanks to all for the bookmarklet - it is almost as good as having Quicksilver on the pc.

Posted 5 years ago

raymond.bergmark ProPower 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 5 years ago

tomvanbraeckel Pro says:

Useful tip, thanks !

Posted 5 years ago

vjcamarena says:

frankly, the main contributors deserve a free pro membership... only ryankennedy doent have one, though. thanks all, this is great!

Posted 5 years ago

batman697 says:

Is there any way to add auto complete on the tags in these bookmarklets?

Posted 5 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 5 years ago

batman697 says:

Thanks for the info

Posted 5 years ago

hakeemshabazz 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 5 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 5 years ago

hakeemshabazz 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 5 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 5 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 5 years ago

benb says:

Any JavaScript people out there who can tell me what's wrong with my script above?

Posted 5 years ago

krohn 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 4 years ago

tim.visher says:

So many props for this!

Posted 4 years ago

btait1 says:

Fantastic - exactly what I was looking for!

Can anyone explain this error?


NTUxYzM4NjU


Posted 4 years ago

btait1 says:

Meh - here is a link to the image.

http://screencast.com/t/NTUxYzM4NjU

Posted 4 years ago

raymond.bergmark ProPower Poster says:

Could you post your java_script here so we can try it out?

Posted 4 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 4 years ago

raymond.bergmark ProPower 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 4 years ago

btait1 says:

Thanks Rajjan! I should have mentioned. I am on a Mac using Chrome.

Posted 4 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 4 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 3 years ago

jamesr404 Pro says:

Wow, this is fantastic ^^

Posted 2 years ago

raymond.bergmark ProPower 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 2 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 2 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 2 years ago

dsteele Pro 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 2 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 2 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 1 year ago

cobrastyle Pro 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 1 year ago

krvermeulen 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 1 year ago

Log in to post a reply.