IE hangs when opening a file from a HTA, the first time. Works OK after that, if it can open one
I have a *.hta file that's going to be autorun by a DVD. It has links like:
<a href="files/myfile.pdf>My File</a>
Quite simple and everything works fine. When a user clicks a link, the *.pdf opens in a new instance of IE. Except when it's burnt to a DVD.开发者_开发技巧 Then, the user clicks a link, IE opens and nothing happens.
This is probably a bug or local security setting that has no remedy but if someone has seen this before?
P.S: I also tried putting the files on a memory stick that has a read-only switch, to simulate being on a CD, but was unable to reproduce the error. This may end up taking a lot of CDs.
I've just bumped into that. I don't have a solution, but I can share some details.
There's an HTA application shell with an iframe:
<html>
<head>
<title>My HTA Application</title>
<HTA:APPLICATION ID="application"
CONTEXTMENU="no"
SELECTION="no" />
<style type="text/css">
body { margin: 0; padding: 0; overflow: hidden; }
#frame-main { width: 100%; height: 100%; overflow: auto; }
</style>
</head>
<body>
<iframe id="frame-main"
frameborder="0"
APPLICATION="yes"
src="web/index.htm">
</iframe>
</body>
</html>
that hosts a simple HTML document with some hyperlinks:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Home</title>
<base target="_blank" />
</head>
<body>
<a href="data/doc.pdf">Open PDF</a>
<a href="data/">Go to folder</a>
</body>
</html>
Works as expected from the local drive. When run from a CD:
- clicking any of the hyperlinks for the first time opens a blank IE window
- clicking any of them for the second time opens the URL as expected
- clicking any of them for the third time does nothing until focus is moved away from the window
When the HTML file is opened directly in the browser, everything works fine.
I've reproduced this on two PCs with Windows 7 (x86 and x64) and Internet Explorer 8. On two Windows XP machines it worked just fine (no details on the version of MSIE).
精彩评论