jQuery Autosuggest bug?

mos's Avatar

mos

25 Apr, 2012 11:42 PM

On the autoSuggest jQuery Plugin example (http://code.drewwilson.com/entry/autosuggest-jquery-plugin), I noticed that the hidden value of the first element removed is never deleted.

For example, I selected the value 'Jimmy' from the autosuggest list..the HTML becomes:

I removed 'Jimmy' and selected 'Mick Jagger', the HTML becomes

I removed 'Mick Jagger' the HTML is now

but I already removed 'Jimmy'.
If I remove Mick Jagger and select another name, the Mick Jagger value disappears, so it seems to be a bug on the first element?

Would appreciate your comments and suggestions for this, as it causes problems if you are adding/removing a jquery autosuggest element and need to retrieve the values.

  1. 1 Posted by mos on 25 Apr, 2012 11:46 PM

    mos's Avatar

    For example, I selected the value 'Jimmy' from the autosuggest list..the HTML becomes:
    <input type="hidden" class="as-values" name="as_values_037" id="as-values-037" value="Jimmy,">

    I removed 'Jimmy' and selected 'Mick Jagger', the HTML becomes
    <input type="hidden" class="as-values" name="as_values_037" id="as-values-037" value="Jimmy,Mick Jagger,">

    I removed 'Mick Jagger' the HTML is now
    <input type="hidden" class="as-values" name="as_values_037" id="as-values-037" value="Jimmy,">

    but I already removed 'Jimmy'. If I remove Mick Jagger and select another name, the Mick Jagger value disappears, so it seems to be a bug on the first element?

    Would appreciate your comments and suggestions for this, as it causes problems if you are adding/removing a jquery autosuggest element and need to retrieve the values.

  2. 2 Posted by Jon on 02 May, 2012 01:47 PM

    Jon's Avatar

    Hi,

    try the attached file.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac