IE7问题 - 禁用自动提示文件下载时无法下载流式文件 [英] IE7 issue - cannot download streamed file when Automatic prompting for file downloads is disabled

查看:156
本文介绍了IE7问题 - 禁用自动提示文件下载时无法下载流式文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序是基于J2EE(JSP / Servlet)的。当我尝试从JSP打开一个新窗口(弹出窗口)并调用一个Servlet操作(例如Streamer.do)时会遇到一个问题,该操作会在弹出窗口中传输一个PDF文件。

My application is J2EE (JSP/Servlet) based. I encounter an issue when i try to open a new window (pop-up) from JSP and call a Servlet action (e.g. Streamer.do) which streams a PDF file inside that pop-up.

问题:
虽然IE 7 - >工具 - > Internet选项 - >安全 - >自定义级别 - >下载 - >自动提示文件下载已禁用,弹出窗口打开时,我无法下载文件(保存/打开提示未启动)。

Problem: While IE 7 -> Tools -> Internet Options -> Security -> Custom Level -> Downloads -> Automatic prompting for file downloads is Disabled and while pop-up window get opened, I am unable to download the file (Save/Open prompt is not comming up).

相反,当我启用此选项时,我可以下载。但是在某些环境中有时会禁用此选项。

In contrast, when I enable this option, I am able to download. But this option sometimes would be disabled in some environments.

在Mozilla Firefox 3.0 / 3/5 / IE6中进行测试时,它可以正常工作而无需更改任何设置。当我检查它以启用i然后得到保存/打开提示才能正常工作。

While testing this in Mozilla Firefox 3.0/3/5/IE6 it is working fine without any settings change. When i check it to enable i then get the Save/Open prompt to work correctly.

这应该是IE7的问题。任何人都可以帮助我们使用Javascript或任何工作设置,不关心是否启用IE7中的自动提示下载选项。

This should be problem with IE7. Can anybody help us with Javascript or any working settings which doesnt care whether the "Automatic prompting for downloads" option in IE7 is enabled.

任何帮助都将非常感谢。

Any help in this would be much appreciated.

问候!

Jai

推荐答案

您提到的设置旨在防止自动下载文件,这正是您尝试执行的操作。如果您希望下载即使选择此选项也能正常工作,则必须下载文件作为用户操作的直接结果。

The setting that you mention is designed to prevent automatic downloading of files and that is exactly what you are trying to do. If you want downloads to work even if this option is selected, you must download a file as a direct result of user action.

用户点击导致下载文件 - >工作正常。

User clicks on a link that leads to a downloaded file -> works correctly.

用户点击按钮,javascript重定向到下载文件 - >工作正常。

User clicks on a button, that in javascript redirects to a downloaded file -> works correctly.

用户点击按钮,在javascript中打开弹出窗口,弹出窗口请求文件 - >此失败。

User clicks on a button, that in javascript opens a popup, and that popup requests a file -> this fails.

用户点击一个按钮,在javascript 中延迟执行重定向到下载的文件 - >这会失败。

User clicks on a button, that in javascript delays execution of redirecting to a downloaded file -> this fails.

与弹出窗口相同的事情和弹出窗口拦截器。允许直接行动,间接行动不允许。

Same thing with popups and popup blockers. Direct action is permitted, indirect action is not.

这篇关于IE7问题 - 禁用自动提示文件下载时无法下载流式文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆