how do I access this jQuery variable?
<p>I have the following <a href="http://valums.com/ajax-upload/" rel="nofollow">code</a> in my project that helps me do some very funky AJAX uploading.</p>

<pre><code>&lt;script&gt;
    $(function(){
        var uploader = new qq.FileUploader({
            action: "{% url ... %}",
            element: $('#file-uploader')[0],
            multiple: true,
            onComplete: function(id, fileName, responseJSON) {
                if(responseJSON.success) {
                    alert("success!");
                } else {
                    alert("upload failed!");
                }
            },
            onAllComplete: function(uploads) {
                // uploads is an array of maps
                // the maps look like this: {file: FileObject, response: JSONServerResponse}
                alert("All complete!");
            },
            params: {
                'csrf_token': '{{ csrf_token }}',
                'csrf_name': 'csrfmiddlewaretoken',
                'csrf_xname': 'X-CSRFToken',
                'iID': '{{ itemID }}',
                'received': $('letter_received').val(),
                'is_company': $('letter_is_company').val(),
            },
        });
    });
&lt;/script&gt;
</code></pre>

<p>The only problem is I want to pass additional GET values to the server. I have tried the above but the script gets executed when the page opens, not when the values change. In the link above under '<em>Sending additional params</em>' the author recommends adding additional values at runtime by using the following code:</p>

<pre><code>uploader.setParams({
   anotherParam: 'value'
});
</code></pre>

<p>I just don't know how I can access the <code>uploader</code> variable. Take the following for example:</p>

<pre><code>&lt;button onclick="update_uploader(1,0)"&gt;
...
&lt;script&gt;
    function update_uploader(received,is_company) {
        uploader.setParams({
            received: received,
            is_company: is_company
        });
    }
&lt;/script&gt;
</code></pre>

<p>I can't access <code>uploader</code> because of scope issues. <em>[and yes I have tried declaring <code>uploader</code> outside of <code>$(function(){</code> but it breaks the uploader :(]</em></p>

<p>Any ideas?</p>
