views:

19

answers:

0

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 : YAHOO.util.Connect.setForm(document.getElementById('formid'), true) 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.