Sending emails a la Google mail

Posted on 2014-10-04
Last Modified: 2014-12-14

In google mail when you click in the send button and start typing it starts to autocomplete a recipient and if you pick the name the name is there in the send box with a cross to remove it. Or it adds a new name if there is one is doesnt recognise. Then when you start typing again to add another recipinet another autocoplete dropdown appears and so the process repeats.

Is there a ui element/plugin/tutorial etc for copying this functonality

Question by:andieje
LVL 58

Expert Comment

ID: 40361263

...and dozens of other autocomplete plugins, this is js - nothing to do with php
LVL 109

Expert Comment

by:Ray Paseur
ID: 40361322
Might intersect with PHP if the auto-complete made an AJAX request to get information from a database.
LVL 53

Expert Comment

ID: 40361451
It is very resource intensive to get it as responsive as Google has it.  Unless there is a lot of bandwidth, and lots of threads available server side it is probably not something that can be done with the same level of efficiency on a smaller site.  I doubt it is using AJAX to respond to the input, because the response is quicker than AJAX would normally deliver.  It is more likely that the data (which originates in the users profile data, is being cached in sessions stuffed into a not exposed segment in the DOM.

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.


Author Comment

ID: 40373809
it does intersect with php tp get autocomplete from database

With respect on this page i see nothing that looks like the google send box unless it in demo i missed

Author Comment

ID: 40373840
Back to the ul page - on the multiple examples page the selected  values are  not associated with an 'x' to remove as in google receipients

attachment 1 - demo
attacement 2 - google

Author Comment

ID: 40373857
Is there a special name for these widgets as you can imagine searching for anythign related to google doent give the best results :)

Author Comment

ID: 40373941
thanks cd for the reality check

Author Comment

ID: 40374966
My last comment didnt come out right

In googlerecipient in googlejquery ui widget you get autocomplete if a name exists, the ability to add a new name and each name is in a box with a delete icon

In jquery you can add multiple values with autocomplete, there is nothing inherent to delete an item, These were the images  i meant to post

Accepted Solution

andieje earned 0 total points
ID: 40489613
I am going to answer my own question with jquery select2. There is an example of google style boxes on there

Author Closing Comment

ID: 40498688
See Tagging Support Section

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
removing a class in javascript 4 47
binding event to form in 9 36
Html input text color the frame line 2 20
JQuery Search Filter 2 28
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question