Hello All
Thanks a lot for your replies. Really helpful.
I implemented the iFrame method and it works perfectly (at least in FF 3
and Safari 3 on Mac).
Setting the width and height alone didn't render the iframe as invisible
though. I had to add a different decorator as well.
---- snip ----
this._dlFrame = new qx.ui.embed.Iframe("");
this._add(this._dlFrame);
this._dlFrame.set({
width: 0,
height: 0,
decorator : new qx.ui.decoration.Background("transparent")
});
---- snip ----
Best - Roman
Fink, Andreas wrote:
> Hi Roman,
>
> my first solution for a download you mentioned was window.open. Its works
> perfect on development with localhost.
> But after deployment on a webserver the popup-blockers of the several clients
> made problems and it didn't work with every security setting.
>
> Then I've implemented an invisible IFrame (width and height = 0), like
> Jonathan mentioned in his post.
> The only problem is that the client browsers blocking the download the first
> time and if the user allows to download the site gets reloaded.
> After that the downloads work perfect.
>
> I simple start the downloads with a small function:
>
> startDownload : function(url) {
> //have to reset the source if the same download was requested before!
> if (dlFrame.getSource() === url) {
> dlFrame.resetSource();
> }
> dlFrame.setSource(url);
> }
>
> -----Ursprüngliche Nachricht-----
> Von: Dietrich Streifert [mailto:[email protected]]
> Gesendet: Freitag, 13. Februar 2009 08:22
> An: qooxdoo Development
> Betreff: Re: [qooxdoo-devel] Download Button
>
> Hi Roman!
>
> I'm simply doing a
>
> window.open(url);
>
> within the execute event listener for the button.
>
> That used to work 'til now.
>
>
> Roman Schmid schrieb:
>> Hello List
>>
>> In my application I'd like to provide a "download-File" option to the
>> user. Now I'm wondering how this is accomplished best using qooxdoo. Is
>> there a way to have a button trigger a file download? Do i have to set
>> the Request transport to "Iframe"?
>> Apparently, there's no responseType "application/octet-stream" or
>> similar. What do i set the responseType to then?
>> Can it even be accomplished using the qooxdoo io classes?
>>
>> Or do I have to put a <a href=""> somewhere in a Label (with HTML
>> Formatting)?
>>
>> Any input is appreciated.
>> Thanks - Roman
>>
>>
>> ------------------------------------------------------------------------------
>> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
>> software. With Adobe AIR, Ajax developers can use existing skills and code to
>> build responsive, highly engaging applications that combine the power of
>> local
>> resources and data with the reach of the web. Download the Adobe AIR SDK and
>> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel