Download file

I have an asp file that renders an XLS file and then downloads it. This works interactively however, when I invoke it in a function that is called by an image button, nothing seems to happen. I’m using ajax post in the following way:

{ view: "imagebutton", width: 30, label: "", align: "right", src: "./images/t_download.png", click: "downloadXLS();" }


function downloadXLS() 
 dhx.notice({ delay: 1000, message: "starting download ..." });
 dhx.ajax().post("exporttoxls.asp?fileid=" + fileId + "&", formData);

Does the post somehow interfere with the download?

Yep, ajax operation will not trigger download
Change it as

dhx.send("exporttoxls.asp?fileid=" + fileId + "&", formData);

it will work exactly as form submit

Works fine - thank you.

Works fine on Chrome (Windows and Android) but on Mozilla on Android the download takes the name of the asp file instead of the name of the xls (and so fails) and Firefox on Windows truncates the name of the xls to the first word.

Does anyone have any idea how I may get Mozilla to behave properly?