[OpenLayers-Users] Ajax POST request and file download dialog

François Van Der Biest francois.vanderbiest at camptocamp.com
Fri Sep 25 12:27:01 EDT 2009


On Fri, Sep 25, 2009 at 4:12 PM, Christopher Schmidt
<crschmidt at metacarta.com> wrote:
> On Fri, Sep 25, 2009 at 03:14:41PM +0200, François Van Der Biest wrote:
>> Hi list,
>>
>> I'm trying to make the browser download a CSV file (created on the fly
>> by GeoServer using outputFormat=csv) by issuing a call to a WFS v1.1
>> protocol's read method.
>> The XHR is issued as a POST request, and thus, I suspect that
>> browser's cannot download the response text as a file.
>> Is this true, and do you know why ? Better : do you see ways to overcome this ?
>
> Don't use XHR. Just make a <forM> element in the DOM, and call form.submit()
> with target="_blank" or target an invisible iframe.


Thank's for the hint, Chris.
... Now, I'm struggling to send raw post data with this basic form. Any advice ?

F.



More information about the Users mailing list