Hidden field is not updated properly after adding and removing the first tab

sheraz.s's Avatar

sheraz.s

13 Aug, 2012 08:38 AM

Hi, i am using this plugin, i have found a little bug while removing a tab from auto suggest field. when we remove a tab the hidden field that contains the selected values is not properly updated. if i add 2 or 3 tabs and then remove them, the hidden field contains the first tab value and is not cleared from hidden field values whereas the suggestion box is empty. please help me how i can solve this issue.

  1. 1 Posted by Jon on 13 Aug, 2012 09:28 AM

    Jon's Avatar

    Try this file.

    I've made some changes with the information some people have shared on this forum.

  2. 2 Posted by sheraz.s on 13 Aug, 2012 09:50 AM

    sheraz.s's Avatar

    i have tried this, but sorry to say, problem still exists. Firsts tag's value si not removed from hidden field value after tag is removed. :(

  3. 3 Posted by Jon on 13 Aug, 2012 10:05 AM

    Jon's Avatar

    I don't have that problem. I'm using that file and these options:

    asHtmlID: "users",
    startText: "",
    emptyText: "No results",
    selectedItemProp: "name",
    selectedValuesProp: "value",
    searchObjProps: "name",
    neverSubmit: true,
    noFree: true,
    selectionLimit: 10
    
  4. 4 Posted by sheraz.s on 13 Aug, 2012 10:28 AM

    sheraz.s's Avatar

    no its not working here. it is not even working on your website.
    i am sending you my js file. if possible please take a look at it. i don't know whats wrong with it.

  5. 5 Posted by Jon on 13 Aug, 2012 11:13 AM

    Jon's Avatar

    I've replaced my js file with yours and my application is perfectly working.

    It has to be something about the way you declare it. This is an example:

    $("#destinatarios").autoSuggest("autocompletar_nombres.php",{
        asHtmlID: "destinatarios",
        startText: "",
        emptyText: "No hay resultados",
        selectedItemProp: "name",
        selectedValuesProp: "value",
        searchObjProps: "name",
        neverSubmit: true,
        noFree: true,
        selectionLimit: 10
    });
    

    Copy or attach all your code here.

    PD: This is not my web, I'm just a user of this great plugin.

  6. 6 Posted by sheraz.s on 14 Aug, 2012 05:25 AM

    sheraz.s's Avatar

    Here is the sample code please take a look at it.
    it contains also db that will be used in it.

  7. 7 Posted by Jon on 14 Aug, 2012 06:14 AM

    Jon's Avatar

    The jquery.Autosuggest.js file you attached is an old one, and if I use it in my application I have the problem too.

    I haven't tested the other files but they seem ok.

  8. 8 Posted by sheraz.s on 14 Aug, 2012 09:25 AM

    sheraz.s's Avatar

    i have downloaded the latest version and used it in the project but the problem stills. is there any other way to get the latest file.?????

  9. 9 Posted by Jon on 14 Aug, 2012 09:32 AM

    Jon's Avatar

    The latest official version is older than the file I attached.

  10. 10 Posted by sheraz.s on 14 Aug, 2012 09:48 AM

    sheraz.s's Avatar

    hmm, i have replaced your file but my bad luck. :(
    i am facing another problem. it will be my pleasure if you can help me. the problem is the first tag i add is displaying after i selected it. for example if i enter "P" then the dropdown displays PHP , pear, etc. i select the PHP and i becomes selected tag. Next time i press "p" drowpdown again displays PHP, Pear. Now i select the "Pear" as a selected tag. next time if i again press "P" i still get "PHP" in dropdown whereas pear will not be in dropdown. please look at screens hots..

  11. 11 Posted by Jon on 14 Aug, 2012 10:36 AM

    Jon's Avatar

    I've downloaded again your code, I've created a database to simulate your scenario.

    You have included twice the AutoSuggest plugin, once 'normal' and the other one packed. Apart from that, everything is perfectly working with your code using 'my' jquery.autoSuggest.js file. If I select 'php', next time I write 'p' I just get 'Pear, Perl, Postgre SQL' as results.

  12. 12 Posted by sheraz.s on 14 Aug, 2012 10:52 AM

    sheraz.s's Avatar

    thank u , thank u , thank u , thank u ,
    jazaa kallah, jazaa kallah, jazaa kallah, jazaa kallah,

    problem is resolved now. thank u very much janab -e-aali

    :)

  13. 13 Posted by Jon on 14 Aug, 2012 11:09 AM

    Jon's Avatar

    Great!!! I'm happy the problem is gone.

  14. sheraz.s closed this discussion on 14 Aug, 2012 11:10 AM.

Comments are currently closed for this discussion. You can start a new one.

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