Why function callback of Connection is not handled with Yahoo UI ?
- by quilovnic
I use Yahoo UI with Grails (so grailsui) and I try to upload a file with Ajax and get a JSON response from the server :
The response is correctly returned by my controller but a popup is displayed to save the file but it's not a file it's a JSON result.
My Yahoo Code is :
callback = {
success: function(o){alert('success');},
failure: function(o){alert('failure');}
}
YAHOO.util.Connect.asyncRequest('POST', '/my/url', callback);
The http response is the JSON result.
What's hell is wrong ? Why does I have dialog box to download the file ?
Thanks a lot.