drupal_implode_autocomplete() is quite unnecessary now that we have a generic drupal_to_js() mechanism. Less code is better.

After this patch, any code that used drupal_implode_autocomplete() can use drupal_to_js() instead, with no other changes.

Tasks:
- Update contrib modules
- Update Ajax docs in the handbook

CommentFileSizeAuthor
autocomplete_17.patch5 KBSteven
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jaza’s picture

Looks like a move in the right direction to me. I'd be happy to update the activeselect module (http://drupal.org/node/49976) to use JSON as well.

When I wrote activeselect, I just copied the technique used by autocomplete - I didn't really think about any other alternatives. Despite having written an AJAX module, I still consider myself a newbie to JavaScript - before now, I didn't know what JSON was, and I'm still scared of actually putting the 'X' (for XML) in AJAX. ;-)

robertDouglass’s picture

Applies and does what it did before, with less code.

@Jaza it was exactly your module that I had in mind when I suggested this change =)

Steven’s picture

Status: Needs review » Fixed

Committed to HEAD. Updated docs. Updated all contrib modules tagged as 4.7.

Anonymous’s picture

Status: Fixed » Closed (fixed)