views:

79

answers:

1

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() {

    MessageWindow.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;
});
A: 

If possible, try to use jQuery plugins like Uploadify. Also, check this for more info:
http://stackoverflow.com/questions/1276916/asynchronous-file-upload-ajax-file-upload-using-jsp-and-javascript

Sidharth Panwar