ActiveX controls are widely used in the Internet. They can increase browsing pleasure by providing videos and animated content. However, these programs may have problems or provide you with unwanted content.
What is ActiveX Control?
ActiveX controls are widely used in the Internet. They can increase browsing pleasure by providing videos and animated content. However, these programs may have problems or provide you with unwanted content. In some cases, these programs can be used to collect information from your computer, damage data on your computer, install software on your computer without your consent, or allow others remotely control your computer. With these risks in mind, you should install these programs with full trust in the publisher.
What do you do when Windows blocks the installation of ActiveX controls?
You may not install the ActiveX control. Installing ActiveX controls blocked by Windows is an extremely risky task. If the security settings of Internet Explorer are at the default level and the ActiveX control does not have a valid digital signature, Windows will prevent the installation of this ActiveX control.
A valid digital signature identifies the publisher (the company, website, or individual distributing the document) and confirms the fact that the document has not been tampered with since its signature. If the file does not have a valid digital signature, you cannot determine whether the file actually comes from the source it declares, or whether it has not been tampered with (for example, a virus may be inserted into the control ). Unless you trust the publisher and know that the file is safe after it is opened, you should not open the file.
Note: The following statement generates an Active object based on the browser version.
XmlHttp = newActiveXObject (aVersions [I]);
This line of JS Code generates an XMLHttpRequest object ..
The name of ActiveX plug-in is enclosed in brackets.
The complete statement should be written as follows:
The Code is as follows:
Var xmlHttp;
Function createXMLHttpRequest (){
If (window. ActiveXObject)
{
Var aVersions = ["MSXML2.XMLHttp. 5.0", "MSXML2.XMLHttp. 4.0", "MSXML2.XMLHttp. 3.0", "MSXML2.XMLHttp", "Microsoft. XMLHttp"];
For (int I = 0; I {
Try
{
XmlHttp = new ActiveXObject (aVersions [I]);
Return;
}
Catch (oError)
{
}
}
}
Else if (window. XMLHttpRequest)
{
XmlHttp = new XMLHttpRequest ();
Return;
}
Throw new Error ("XMLHttp object cocould not becreated .");
}
Supplement:The reason is that various browsers have different support for JavaScript. Therefore, XmlHttpRequest objects are generated in different ways. For example, IE. ActiveX is supported.
["MSXML2.XMLHttp. 5.0", "MSXML2.XMLHttp. 4.0", "MSXML2.XMLHttp. 3.0", "MSXML2.XMLHttp", "Microsoft. XMLHttp"]; these are ActiveX versions.
Some browsers, like FireFox, support XmlHttpRequest. the browser has built-in objects. You can use "xmlHttp = new XMLHttpRequest ();".
If (window. XMLHttpRequest) is used to determine whether the browser has a built-in XmlHttpRequest object.