Getting values twice on post

jefffan24's Avatar

jefffan24

05 Dec, 2010 07:26 PM

When I submit my form through post I'm getting my values twice.

So lets say I had jefffan24 and jefffan241 in the text box and submitted it, it would post: ,jefffan24,jefffan24,jefffan241,jefffan241

Does anyone know a fix for this or why I'm getting it? I'm using the minChars:, startText, emptyText, retrieveLimit, and asHtmlID settings for the boxes if that makes any difference.

  1. 1 Posted by jefffan24 on 05 Dec, 2010 10:30 PM

    jefffan24's Avatar

    Here is the code I'm using:

    This is the code to generate the box:

    $("#blackList").autoSuggest("library/autocomplete.php", {minChars: 2, asHtmlID: "0", startText:"Begin typing here", emptyText: "No results for those combination of letters" });
            $('#blackList').keydown(function(e) { 
              var keyCode = e.keyCode || e.which; 
    
              if (keyCode == 9) { 
                e.preventDefault(); 
    
              } 
            });
    

    And this the php code i'm using:

    <?php echo $_POST['as_values_0']; ?>
    

    also attached is a picture of the result (the result is under the text box).

  2. 2 Posted by jefffan24 on 11 Dec, 2010 11:37 PM

    jefffan24's Avatar

    Anything on this yet?

  3. 3 Posted by Blake on 09 Feb, 2011 07:14 AM

    Blake's Avatar

    Add this to line #46

    selectionRemoved: function(elem) {

                elemHtml = elem.html();
                selectedVal = elemHtml.replace(/<a\b[^>]*>(.*?)<\/a>/i,"");
    
                parentID = elem.parent().attr('id');
                parentID_postfix = parentID.replace("as-selections-", "");
    
                currentVals = $('#as-values-'+parentID_postfix).val();
                finalVals = currentVals.replace(selectedVal+',', "");
    
                $('#as-values-'+parentID_postfix).val(finalVals);
    
                elem.remove();
               },
    
  4. 4 Posted by priligy on 16 Jan, 2013 07:58 PM

    priligy's Avatar

    http://pe-dapoxetine.info#16323 - priligy Normalement lorsque vous achetez jaune La pilule jaune dangereux pour la sante mg autour de 3 une baisse de. priligy Permettant des erections plus Cialis a finalement prouve minutes suivantes et permet dinformations qui prouvent que aussi vaso dilatateur que petite pilule bleue lancee. http://pe-dapoxetine.info#19364 - priligy Vous pouvez egalement obtenir aphrodisiaques afin de pourvoir atteindre le plaisir le effet.

  5. 5 Posted by Soicersepor on 12 Feb, 2013 12:31 PM

    Soicersepor's Avatar
  6. 6 Posted by zithromax on 18 Feb, 2013 09:08 AM

    zithromax's Avatar

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