I am writing an HTA and I need to pass a variable that I have in Javascript to a VBScript function. Can you please let me know how to do this? Here is a (nonworking) example of what I'm trying to do:
<!DOCTYPE ... >
<html>
<head>
<HTA:APPLICATION ID="chrome" APPLICATIONNAME="kiosk" ... />
...
<script type="text/javascript">
...
var closer = "C:\Program Files";
...
</script>
<script language="VBScript" src="close.vbs"></script>
</head>
<body>
<a href="#" onClick="VBScript:CloseExplorerWindow(window.closer)">close</a>
</body>
</html>
Please bear in mind that this example is waaaay oversimplified - I've just tried to strip out all the complexity and present you with what it is I'm actually trying to do.
Bonus: Is is possible to fire a VBScript function from a javascript one? My HTA uses jQuery quite extensively and it'd be nice to be able to do the system stuff I need to do from within jQuery.