Hi, Marcel!

window.location = your_url;
Source:
http://stackoverflow.com/questions/349067/download-a-file-using-javascript

I hope that answers your question. There might be a better way.

Cheers,
Gleb


Marcel Ruff wrote:
> 
> Hi,
> 
> it sounds trivial, but I'm missing the right idea.
> 
> When a user clicks on a qooxdoo Button I want to start a download
> and not reloading my current page (e.g. in another browser tab 
> (target="_blank")).
> 
> this.exportButton.addListener("execute",  function(e){
>    var link = "http://xxx.com/download/xyz.csv";;
>    // ????? How to Trigger the download ????
> }, this);
> 
> What is the proper approach?
> 
> Thanks
> Marcel
> 
> PS: I also tried
> 
> var request = new qx.io.remote.Request(link, "POST", "application/csv");
>         request.setUsername("xxxxx");
>         request.setPassword("yyyyy");
>         request.setAsynchronous(false);
>         request.addListener("completed",  function(e){
>           alert("completed=" + e);
>         }, this);
>         request.send();
> 
> with no success (no request was triggered as of Firebug)
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day 
> trial. Simplify your report design, integration and deployment - and focus
> on 
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/How-to-trigger-a-download-when-clicking-a-qooxdoo-button-tp4005016p4005573.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to