开发者

want to implement ajax file upload in my user profile form for picture upload

开发者 https://www.devze.com 2023-01-15 12:24 出处:网络
imple ajax upload , want to know how to implement it in my code ... I have searched lot of uploader not know how to implement it in my code.

imple ajax upload , want to know how to implement it in my code ... I have searched lot of uploader not know how to implement it in my code.

$('#message_form').html('Profile Information Edit'+ ''+ ''+ 'First Name :'+ 'Last Name :'+ 'E- Mail :'+ 'Photo :'+ ''+ ''+ 'Gibs Owned:'+ '' );

MessageWindow.show();
$(".cancel").click(function() {

    Messa开发者_StackOverflow社区geWindow.hide();
});
$(".submit").click(function() {
    ajaxFileUpload();
    var dataString = $("#myform").serialize();
    $.ajax({
        type: "POST",
        url: YAPI.baseUrl+"updateuser.php",
        data: dataString,
        success: function(data){
            response = eval('('+data+')');
            alert(response.message);
            YAPI.execute({command:'getuser',userid:App.currentUser.getData('userid')},
                function(response,data){
                    //App.currentUser.setData();
                }
            );

            MessageWindow.hide();
        }
    });
    return false;
});


If possible, try to use jQuery plugins like Uploadify. Also, check this for more info:
Asynchronous file upload (AJAX file upload) using jsp and javascript

0

精彩评论

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