|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
FileTransfer / openInDownload problem on IE7Hi,
I've ran into a small problem with 'dwr.engine.openInDownload' on IE. In my (rather large) webapp there are download links users can click to download files, which are dynamically generated on the server (depending on certain input fields). The download process works fine on Firefox. On IE however, the user first gets the standard security warning that a file download has been blocked. Now the problem is, that when the user tries to download the file anyway (click on security warning and select 'download...') the whole page gets reloaded. This is quite bad in my case since, I don't track the current state and all client data is lost. Is there any way to prevent this from happening? Or am i just doing it wrong? :) Here's the javascript code I'm using: function saveFile() { // query is extracted from an input field here var query = "..."; QueryService.generateCSVFile(query, { callback: function(data) { dwr.engine.openInDownload(data); }, errorHandler: function(errMsg, err) { displayErrorMessage(err); } }); } On the Java side it looks like this: String someString = "...."; ByteArrayOutputStream buffer = new ByteArrayOutputStream(); buffer.write(someString.getBytes()); return new FileTransfer("values.csv", "text/comma-separated-values", buffer.toByteArray()); I've also tried using 'window.open' or an iframe to initiate the download but couldn't get it to work (IE Popup blocker basically leads to the same problem). Thanks in advance for your help, Michael --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: FileTransfer / openInDownload problem on IE7I've done 2 things: - Added a parameter to the InMemoryDownloadManager (the default) to allow you to tweak the number of downloads before purge. The default is 1, but if you set the DWR init-param downloadRequestsBeforeRemove to something else, you can change the default. - If you are using the FileStoreDownloadManager, then I've turned off auto-delete altogether. These tweaks should hit SVN soon. I guess the ideal solution would be to detect *completed* downloads rather than started ones. If anyone feels like having a play ... Joe. On Mon, Sep 22, 2008 at 11:13 AM, Michael Benz <michael.benz@...> wrote: Hi, |
|
|
Re: FileTransfer / openInDownload problem on IE7
|
| Free embeddable forum powered by Nabble | Forum Help |