Reputation: 31
I need to use something which is compatible with IE10 and not with IE9.
My HTA was made for IE9 and worked fine : visible icon and maximized windows.
By changing <meta http-equiv="x-ua-compatible" content="ie=9"/>
to <meta http-equiv="x-ua-compatible" content="ie=10"/>
, there is no icon and the windows is not maximized.
Any idea please ?
NOT working :
<html>
<head>
<title>test</title>
<HTA:APPLICATION ID = "1"
APPLICATIONNAME="1"
BORDER="thin"
BORDERSTYLE="normal"
ICON="icon.ico"
MAXIMIZEBUTTON="yes"
MINIMIZEBUTTON="yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="yes"
SYSMENU="yes"
WINDOWSTATE="maximize">
<meta http-equiv="x-ua-compatible" content="ie=10"/>
</head>
<!---->
<body style="overflow:hidden;">
No icon and not maximized, with ie=10
</body>
</html>
Working : but I need IE10 now.
<html>
<head>
<title>Test</title>
<HTA:APPLICATION ID = "1"
APPLICATIONNAME="1"
BORDER="thin"
BORDERSTYLE="normal"
ICON="icon.ico"
MAXIMIZEBUTTON="yes"
MINIMIZEBUTTON="yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="yes"
SYSMENU="yes"
WINDOWSTATE="maximize">
<meta http-equiv="x-ua-compatible" content="ie=9"/>
</head>
<!---->
<body style="overflow:hidden;">
Icon showing correctly with ie=9
</body>
</html>
Upvotes: 2
Views: 1642
Reputation: 15327
What usually works for me, is to have an HTA with NAVIGABLE
set to yes
, and changing the window.location
to an HTML file using standard HTML. This allows the use of the HTA properties on the one hand, and the use of IE=edge
(or another targeted IE version) on the other:
myHTA.hta
<html>
<head>
<title>test</title>
<HTA:APPLICATION ID = "1"
APPLICATIONNAME="1"
BORDER="thin"
BORDERSTYLE="normal"
ICON="icon.ico"
MAXIMIZEBUTTON="yes"
MINIMIZEBUTTON="yes"
NAVIGABLE="yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="yes"
SYSMENU="yes"
WINDOWSTATE="maximize">
<script>
window.location = 'htaContent.html';
</script>
</head>
</html>
htaContent.html
<html>
<head>
<title>test</title>
<meta http-equiv="x-ua-compatible" content="ie=10"/>
</head>
<body style="overflow:hidden;">
Put your HTML content here
</body>
</html>
See here.
Upvotes: 5