jQuery Autocomplete - Passing Extra Parameters |
[eluser]Kyle Johnson[/eluser]
Ran into an interesting problem. I downloaded and slightly modified the autocompleter library to allow for POST data instead of GET data. I didn't change anything else about the library. *Edit* I also disabled caching by commenting out a few lines. So I am trying to have a autocomplete input box send off for its data, but I wanted to pass some optional extra parameters to it. The autocompleter library allows for this, but for some reason my 'serial' argument is being ignored, well it is passing an empty string to the POST data. (I downloaded Firebug 1.3 for Firefox so that I can verify the POST data). Code: $(document).ready(function(){ *** Slight update *** I found out that the $("#serial").val(); only passes the initial value set to the form element with id="serial". Why is it not returning the most current value? Is it related to the function being withing the $(document).ready() event? *** End update *** The unmodified version can be found here. modified code here Code: function requestData(q) { second modified function Code: this.findValue = function(){ |
Messages In This Thread |
jQuery Autocomplete - Passing Extra Parameters - by El Forum - 06-09-2009, 11:18 AM
jQuery Autocomplete - Passing Extra Parameters - by El Forum - 06-09-2009, 05:14 PM
|