Why function callback of Connection is not handled with Yahoo UI ?
Posted
by quilovnic
on Stack Overflow
See other posts from Stack Overflow
or by quilovnic
Published on 2010-04-21T14:21:01Z
Indexed on
2010/04/21
14:23 UTC
Read the original article
Hit count: 272
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.
© Stack Overflow or respective owner