开发者

downloading csv file using dojo xhrget

i have a csv file in my local which i try to return as response using a servlet. i call this servlet using dojo, but it seems it doesnt want to download it. i have set the response headers to "Content-Disposition" and attachment; filename=myfile, but it doesn't allow the file save as dialog to appear.

i think i read开发者_如何学Python somewhere that dojo doesn't allow the file save dialog box to appear.


This isn't a question of "Dojo not allowing" the save dialog to appear - you cannot do such a thing via XHR by nature.

If you want someone to be offered a download as attachment, you'll need to do so using a full page request (such as an iframe).

Perhaps dojo.io.iframe would be worth a look: http://dojotoolkit.org/reference-guide/dojo/io/iframe.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜