using jquery $.ajax to retrieve data and push data into javascript array through the success function? HELP!
<p>I have a function that I'm trying to retrieve values using $.ajax and push the returned data into an array called output. Problem is the success function will not allow me to push the results into the array. see below for code.</p>

<pre><code>              var getValues = function(el)
                         {
                            var value = ($(el).val());

                            if(value == '' || $(el).attr('disabled'))
                            {
                                return [];
                            }

                            var string = 'value=' + value;

                            var output = [];

                            $.ajax({
                              type: "GET",
                              url: 'shocklookup_callback.php',
                              dataType: "string",
                              data: string,
                              success: function(data) {

                                }
                            });


                            //output.push({ text : value + 'test', value : value + 'test1'} );
                            return output;

                        };
</code></pre>

<p>Any ideas of what I can put in the success function to be able to push the data into the output array? Also I need to be able to return the output array to the original function getValues.</p>

<p>If this doesn't' make a whole lot of sense please let me know and I'll try to explain better.</p>

<p>Thanks,</p>

<ul>
<li>Dane</li>
</ul>
