how to pass a parameter to jquery script and set a file path dynamically

how to pass a parameter to jquery script and set a file path dynamically

Hi everyone,

I have a form that contains:

  1. <form id="fileupload" action="http://localhost/bootstrap1/blueimp/server/php/index.php?uid=16&" method="POST" enctype="multipart/form-data">
When the form page loads, previously uploaded files are supposed to loaded into a table using the jquery. getJSON method like so:



  1.  // Load existing files:
            $('#fileupload').each(function () {
                var that = this;
                $.getJSON(this.action, function (result) {
                    if (result && result.length) {
                        $(that).fileupload('option', 'done')
                            .call(that, null, {result: result});
                    }
                });
            });








I am new to jquery so I don't completely understand what this means, but what I do know is that I need to add the uid to the path to get the previously uploaded pictures, because I am storing the photos for each authenticated user in a subfolder with the users uid as its name

I need to retrieve the parameter uid within the

"http://localhost/bootstrap1/blueimp/server/php/index.php?uid=16&"

into my jquery script to add to the filepath url. Can anyone explain how to do this ?

Thanks,

Bill