<p>Is it possible to use both JScript and VBScript in the same HTA? Can I call VBScript functions from JScript and vice-versa? Are there any "gotchas," like the JScript running first and the VBScript running second (classic ASP pages have this issue).</p>

[{'answer_id': 64638, 'author': 'Mark Brackett', 'author_id': 2199, 'author_profile': 'https://Stackoverflow.com/users/2199', 'pm_score': 5, 'selected': True, 'text': '<p>Yeah, just separate them into different script tags:</p>\n\n<pre><code>&lt;script language="javascript"&gt;\n   // javascript code\n&lt;/script&gt;\n\n&lt;script language="vbscript"&gt;\n   \' vbscript code\n&lt;/script&gt;\n</code></pre>\n\n<p>Edit: And, yeah, you can cross call between Javascript and VBScript with no extra work.</p>\n\n<p>Edit: This is also true of ANY Windows Scripting technology.  It works in WSF files and can include scripts written in any supported ActiveScript language such as Perl as long as the engine is installed.</p>\n\n<p>Edit: The specific "gotcha" of all JScript being executed first, then VBScript is related to how ASP processes scripts. The MSHTA host (which uses IE\'s engine) does not have this problem. I\'m not much into HTAs though, so I can\'t address any other possible "gotchas".</p>\n'}, {'answer_id': 14622356, 'author': 'caglaror', 'author_id': 430447, 'author_profile': 'https://Stackoverflow.com/users/430447', 'pm_score': 0, 'selected': False, 'text': '<p>Also you can give references between them. For example: \nat the background some function on vbscript handle with database and FSO issues, and let javascript create user interfaces and dialogs etc. with DOM in frontline.\nWhenever you need you can call both functions from each script sides.\nIn js you can call vbs function, and also in vbscript you can call js functions. Then you can use their returns where you call them.\nRegards</p>\n'}, {'answer_id': 37095721, 'author': 'Dennis Bareis', 'author_id': 3972414, 'author_profile': 'https://Stackoverflow.com/users/3972414', 'pm_score': 0, 'selected': False, 'text': '<p>Event handlers (like Onclick) should have the code prefixed with "javascript:" or "vbscript:"</p>\n'}]
['https://Stackoverflow.com/questions/64605', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5616/']