Question

I've developed a rails website in which I've got a text box with autocompletion facilities (When the user starts typing, a list of valid values "drops down" under it). For this, I used Rail's autocomplete.

Now I'm developing a mobile version of this site. Since the target browsing phone will be the iphone, I'm using jqtouch.

Hence my question is: What is the best way to do an "autocompletable ajax text box" on an iphone web app?

I suspect there should be an easy way of doing this since jqtouch uses jquery, and there're several autocomplete plugins for it (by the way, no idea which one is best suited for this task). However, if anyone thinks there's a better way to do this than with jqtouch, I'm open to suggestions.

Was it helpful?

Solution 2

Ok, after nearly a week employed on this, I have to respond to myself:

As of today (Feb 2010) I could not find any "good" or at least "standarized" way of doing ajax autocompletes for the iphone. I don't think there are.

The only options you have right now are:

  • Cook yourself a custom autocomplete (probably using one of the jquery plugins). The result might not look very good on an iphone, unless, as Jon says, you limit it to 3 results.
  • Go for something completely different. In my case, I've decided to have two fields instead of one: a text box that the user can "use as a filter" and a "dynamic select" in which the user chooses the right answer.

I'll be glad to accept any alternatives if they appear, in the future. For now I consider this closed (with no valid response).

OTHER TIPS

I do not have a URL for a solution, but I too have considered this issue and have the following thoughts:

Make the most of limited space

On an iPhone, the keyboard takes up a lot of room, so you will have very little real estate for displaying an ordinary auto-complete box.

For this reason I believe you should list your auto-complete options inline. Hopefully, with this method you can display 2-3 options per line.

Don't mess with the focus

Another issue to consider is the focus. If you have used StackOverflow or Delicious on an iPhone you will realise that the changes in focus actually make it very difficult to create a decent auto-complete tool as when the text is altered the zoom and positiono the window is also changed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top