Hi Marcel

If you want to suppress the popup blocker warning then the trick is to make 
sure that the window.open() happens as a direct result of the users click event 
– I’ve got this in one of my apps and it works fine on Firefox for a PDF 
download (the PDF opens in another tab, without a popup blocker warning):

    var btn = new qx.ui.form.Button("Download").set({ allowGrowY: false });

    this._add(btn);

    btn.addListener("execute", this.__onDownload, this);



//...snip ...


    __onDownload: function(evt) {

      var src = // get the absolute URL here

      window.open(src, "_blank");

    }


The user can then save the PDF.

Regards
John

From:  Marcel Ruff <m...@marcelruff.info>
Reply-To:  qooxdoo Development <qooxdoo-devel@lists.sourceforge.net>
Date:  Friday, 4 December 2015 at 11:27
To:  qooxdoo Development <qooxdoo-devel@lists.sourceforge.net>
Subject:  [qooxdoo-devel] Download PDF from inside qooxdoo desktop

    
 Hi,
 
 how do I best download a PDF from inside a qooxdoo desktop application?
 
 If I use window target the popup blocker of firefox reacts.
 
 How is it possible that inside my qooxdoo application the firefox download 
dialog opens
 to save the pdf?
 
 Thank you
 Marcel
  
------------------------------------------------------------------------------ 
Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users 
amazing mobile app experiences with Intel(R) XDK. Use one codebase in this 
all-in-one HTML5 development environment. Design, debug & build mobile apps & 
2D/3D high-impact games for multiple OSs. 
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140_______________________________________________
 qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to