views:

72

answers:

1

Hi people,

I'm using Valum's AJAX file uploader. I am trying to send a parameter with the GET request made by the jQuery plugin. This code used to work a few hours ago. But it isn't now!

Can't see any error in Firebug either.

Help!

$(document).ready(function(){

    $("#newProject").colorbox({width:"38%",inline:true, href:"#project-new"});

    var uploader = new qq.FileUploader({
        element: document.getElementById('projectCsv'),
        action: 'new-project.php',                        
        params: {
            name: $('#projectName').val()
        },
        onSubmit: function(){
            if($('#projectName').val().length < 4)    {
                alert('Project name should be at least 4 characters long.');
                return false;                            
            }                            
        },
        onComplete: function(id, fileName, responseJSON){
            var result = responseJSON.success;
            if(result==true)
                location.reload();
            else
                return true;
        }
    });                  
});
A: 

I worked it around by editing the fileuploader.js (line 1183). Added

params['name'] = $('#projectName').val();

and it works well now

KPL