PDA

View Full Version : ajax post



plmdoctor
18 Mar 2011, 9:31 AM
I am trying to do a ajax post on a form that has a fileuploadfield; a submit() sends the request as multipart/form-data. I tried using the updater but cannot keep it from replacing the form fields with the response json string. I thought returning false in the 'beforeupdate' event would keep the form from being updated?



fp.getUpdater().update({

url: 'director.jsp',
params: {action: 'login'},
text: 'Connecting',
discardUrl: true,
listeners: {
'beforeupdate': function(){returnfalse;}
},
callback: function(el,success,response,options){
// do stuff here like login
}
});