Reputation: 121
I have a html code and it has a js file inserted. The javascript file is used with the inputs so i don't wanna remove the .js
Can i make this html file .hta? (html application?)
Is it possible to transform it to a .hta without removing the major parts?
this is my code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>My Search Engine</title>
<style>
div {
background-color: lightgrey;
height: 130px;
width: 600px;
border: 15px solid black;
padding: 15px;
margin: 15px;
}
</style>
</head>
<body onload="myClear()">
<center>
<input type="file" id="fileinput" /><br /><br />
<input type="text" id="myInput" />
<script type="text/javascript" src="mySE.js"> </script>
<input type="submit" id="myClear" value="Clear" onclick="myClear()" /><br /><br />
<div id="fxQU" class="fxQU"></div>
</center>
<p id="myQU"></p>
</body>
</html>
Upvotes: 0
Views: 1633
Reputation: 61859
yes you can use JavaScript in a .hta and you can reference separate javascript files in the normal way.
As a bonus, you can even instantiate ActiveX objects using javascript if you need to (which you can't do in a normal browser). I once wrote a HTA which used JavaScript to talk to an Oracle database via ODBC (via ActiveX).
Upvotes: 1