Added to post Jun-19-2014
Thanks Bond. Since you had IE9, I appreciate your test. Hopefully if somebody out there has IE 10 they will test it, too. It does not make any sense why under the IE 11 engine you can only run compatibility up to ie8.
I created this tiny, itty-bitty HTA in order to post it so hopefully I can find out what I am missing.
My system is a Win7 Pro 64bit with IE 11.
When I set the meta tag as:
<meta http-equiv="x-ua-compatible" content="ie=8">
the HTA runs peachy-keen. No problems. But when I change it to:
<meta http-equiv="x-ua-compatible" content="ie=9">
it doesn't run so good.
Now ... I know that there was a big family blow-out between IE 11 and VBScript. VBscript got booted out of the house for good. IE 11 refuses to communicate with it anymore. So I can understand why setting it to content="ie=edge" would not work. But why doesn't it work when setting it to content="ie=9"?
<!DOCTYPE html>
<head>
<meta http-equiv="x-ua-compatible" content="ie=8">
<hta:application
applicationname="Hmmmmmm"
singleinstance="yes"
id="oHTA"
>
<title>Huh? What?</title>
<script language="VBScript">
Option Explicit
Dim objFSO,file
Sub Window_OnUnLoad
Set objFSO=CreateObject("Scripting.FileSystemObject")
Set file=objFSO.OpenTextFile("c:empsubmit.txt",2,True)
file.Write oHTA.document.getElementById("aa").value
file.Close
Set objFSO=Nothing
Set file=Nothing
End Sub
Sub Window_OnLoad
window.ResizeTo 240,130
End Sub
Function Form_OnSubmit()
window.Close
Form_OnSubmit=False
End Function
</script>
</head>
<body style="margin:30px;">
<form id="form" action="">
<input id="aa" type="text" size="10" value="test">
<input type="submit" value="Submit">
</form>
</body>
</html>
Running it as ie8 set in the meta tag works fine ... window pops up, gets resized, and writes to the file on submit ... glory-be!
Running it as ie9 set in the meta tag ... window pops up, resizing is ignored, and writing to the file is ignored ... as if all the VBScript is being ignored.
What information am I missing?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…