<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>&gt; Date: Thu, 7 May 2009 08:46:46 -0400<br>&gt; To: kwonghu@hotmail.com<br>&gt; CC: users@openlayers.org<br>&gt; Subject: Re: [OpenLayers-Users] Requesting zip data using OpenLayers.Request.GET. bug ?<br>&gt; From: crschmidt@metacarta.com<br>&gt; <br>&gt; On Thu, May 07, 2009 at 08:28:31PM +0800, Kwong Hu Kiu wrote:<br>&gt; <br>&gt; This question is more appropriate for the users list. Please do *not*<br>&gt; crosspost to both lists.<br>&gt; <br>&gt; &gt; Hi,<br>&gt; &gt; <br>&gt; &gt; I am using OpenLayers.Request.GET to request a zip archive that I have generated on the server side.<br>&gt; &gt; <br>&gt; &gt; OpenLayers.Request.GET is working well. I can receive the request parameters on the server-side.<br>&gt; &gt; <br>&gt; &gt; These parameters are used by my wms service to return a zip archive with bitmap data zipped inside.<br>&gt; &gt; <br>&gt; &gt; But for some reasons when I send the zip file from the server to browser,<br>&gt; &gt; It's not opening a download dialog like I expected that let users to download the zip file.<br>&gt; &gt; <br>&gt; &gt; 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>&gt; &gt; <br>&gt; &gt; Strangely,<br>&gt; &gt; <br>&gt; &gt; If I request from the browser by typing the url, it works.<br>&gt; &gt; eg. http://localhost/wms.aspx?REQUEST=downloadZiparchive.<br>&gt; &gt; <br>&gt; &gt; I am wondering if this is a bug or I am not using it correctly ?<br>&gt; <br>&gt; Expecting that an XMLHttpRequest will trigger a file download is your<br>&gt; mistake. If you want users browsers to download something, then send<br>&gt; them to that ocation -- either by giving them a link to click, or by<br>&gt; setting document.location. <br>&gt; <br>&gt; &gt; Need to solve this asap.<br>&gt; &gt; <br>&gt; &gt; Thanks.<br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; <br>&gt; <br>&gt; &gt; _______________________________________________<br>&gt; &gt; Dev mailing list<br>&gt; &gt; Dev@openlayers.org<br>&gt; &gt; http://openlayers.org/mailman/listinfo/dev<br>&gt; <br>&gt; <br>&gt; -- <br>&gt; Christopher Schmidt<br>&gt; MetaCarta<br></body>
</html>