开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜