рдХреЛрдб:
function init(){
var onUploadButtonClick = function(e){
//the second argument of setForm is crucial,
//which tells Connection Manager this is a file upload form
YAHOO.util.Connect.setForm('testForm', true);
var uploadHandler = {
upload: function(o) {
alert(o.responseText);
}
};
YAHOO.util.Connect.asyncRequest('POST', 'upload.php', uploadHandler);
};
YAHOO.util.Event.on('uploadButton', 'click', onUploadButtonClick);
}
YAHOO.util.Event.on(window, 'load', init);
рдбреЗрдореЛ: http://test.thecodecentral.com/demos/asyncupload/
рд╡рд┐рд╡рд░рдг: http://thecodecentral.com/2007/09/04/asynchronous-file-upload-yuis-approach