开发者

JQuery not returning value

开发者 https://www.devze.com 2023-01-17 23:18 出处:网络
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!

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: 'ne开发者_如何学Cw-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;
        }
    });                  
});


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

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

and it works well now

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号