<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br><br><div>How am I crossposting ? <br>I thought this 'might' be a bug. That's why i sent it to the dev list.<br></div>Is this wrong ?<br><br>Anyway... <br><br>No, you don't understand my question.<br>Once users clicked on a button called 'Download zip'. <br>The wms-server will send a respond together with a zip file. <br>I thought this will work if Openlayers.Request is behaving the same way as requesting from the browser.<br><br>> Date: Thu, 7 May 2009 08:46:46 -0400<br>> To: kwonghu@hotmail.com<br>> CC: users@openlayers.org<br>> Subject: Re: [OpenLayers-Users] Requesting zip data using OpenLayers.Request.GET. bug ?<br>> From: crschmidt@metacarta.com<br>> <br>> On Thu, May 07, 2009 at 08:28:31PM +0800, Kwong Hu Kiu wrote:<br>> <br>> This question is more appropriate for the users list. Please do *not*<br>> crosspost to both lists.<br>> <br>> > Hi,<br>> > <br>> > I am using OpenLayers.Request.GET to request a zip archive that I have generated on the server side.<br>> > <br>> > OpenLayers.Request.GET is working well. I can receive the request parameters on the server-side.<br>> > <br>> > These parameters are used by my wms service to return a zip archive with bitmap data zipped inside.<br>> > <br>> > But for some reasons when I send the zip file from the server to browser,<br>> > It's not opening a download dialog like I expected that let users to download the zip file.<br>> > <br>> > Instead, nothing is happening on the browser side(no javascript error) but i know the bitmap data and zip archive is being created and passed onto the browser through debugging.<br>> > <br>> > Strangely,<br>> > <br>> > If I request from the browser by typing the url, it works.<br>> > eg. http://localhost/wms.aspx?REQUEST=downloadZiparchive.<br>> > <br>> > I am wondering if this is a bug or I am not using it correctly ?<br>> <br>> Expecting that an XMLHttpRequest will trigger a file download is your<br>> mistake. If you want users browsers to download something, then send<br>> them to that ocation -- either by giving them a link to click, or by<br>> setting document.location. <br>> <br>> > Need to solve this asap.<br>> > <br>> > Thanks.<br>> > <br>> > <br>> > <br>> > <br>> <br>> > _______________________________________________<br>> > Dev mailing list<br>> > Dev@openlayers.org<br>> > http://openlayers.org/mailman/listinfo/dev<br>> <br>> <br>> -- <br>> Christopher Schmidt<br>> MetaCarta<br></body>
</html>