Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VBScript support in Internet Explorer 11

I tried the following HTML page with two scripts:

<html>   …   <body>     <script type="text/javascript">       alert ('Javascript');     </script>     <script type="text/vbscript">       msgbox "Vbscript"     </script>   </body> </html> 

On Windows 8.1 preview + Internet Explorer 11, the JavaScript worked, the VBScript did not.

On (Windows 8 + IE10), (Windows 7 + IE9), the two scripts worked.

I did not find any information about the end of VBScript support in Internet Explorer 11, did you?

like image 891
Ensayo Avatar asked Jul 05 '13 07:07

Ensayo


People also ask

Does IE 11 support VBScript?

VBScript support in IE (Internet Explorer) 11 is turned off by default. If you want to run VBScript code in IE 11, you need to change two settings. Click "Allow blocked content" to allow IE 11 to run VBScript code embedded in the Web page.

Is VBScript still supported?

VBScript is gone. Once a scripting language to compete with JavaScript in web browsers, VBScript is now disabled by default in Internet Explorer on all supported versions of Windows after a recent Windows update. But VBScript has been fading away for years.

How do I enable VBScript in Windows 10?

Open Group Policy Management. Select Group Policy Object (GPO), and then right-click and select Edit. Double-click and edit the Allow VBScript to run in Internet Explorer setting. Click Enabled to enable the policy.

Does VBScript work in Edge?

Yes, Edge supports VBScript in IE mode (even in Windows 11) because, as stated by @user692942, it's really iexplore.exe that renders the page using MSHTML, as long as the compatibility mode is set correctly.


2 Answers

The IE team has been trying to retire VBScript for years.

http://msdn.microsoft.com/en-us/library/windows/apps/Hh700404.aspx indicates that support was removed from the ExecScript API. http://msdn.microsoft.com/en-us/library/ie/dn384057(v=vs.85).aspx explains that it's removed from IE11 Edge mode in the Internet Zone.

If you add the following to your HEAD tag, your VBScript will run:

<meta http-equiv="x-ua-compatible" content="IE=10"> 
like image 160
EricLaw Avatar answered Oct 02 '22 10:10

EricLaw


It actually very simple.

Only IE 10 and older supports VBScript. However you can easy change compatibility mode on IE 11 to IE 10 and it works perfectly fine.

I had the same issue: an old web site developed in 2004 using ASP and VBScript and the following procedure was the solution for me.

In order to change compatibility mode in IE 11 :

  1. Press F12 to open developer tools
  2. In left toolbar scrool down until you see "Emulation" settings page
  3. Change Document Mode from default ("Edge") to 10
  4. Enjoy your VBScript
like image 42
Ev.Rei. Avatar answered Oct 02 '22 10:10

Ev.Rei.