Auto-Activate ActiveX Controls in The Web Page

Friday, December 8, 2006

Microsoft has made changes to the way that newest Internet Explorer handles some content in Web pages due to security reason. When Internet Explorer encounters a page with ActiveX controls (such as a page using PI-ActiveView to show .pdi file), the control may require a single click to activate. (the newest Internet Explorer represent If user installed security update 912812)

Let us take PI-ActiveView as a example.When you open the page embed .pdi, a tooltip will appear to prompt you that the control should be clicked to first activate before it can interact.

001

When a control is inactive, the following effects occur

  • Dynamic HTML events related to user interaction, such as onblur and onclick, are blocked.

  • The control does not respond to window messages generated by the keyboard or mouse, such as WM_CLICK and WM_KEYPRESS, and so on.

  • An overlay window, created on the control's OLE site, prevents keyboard and mouse messages from reaching the inactive control.

This requirement to click to activate will happen each time you refresh or visit the Web page. This is a annoying to user. Fortunately, developers can rewrite web pages so that users are never presented with a tooltip when they visit the page acording the artilcel on MSDN.

The article's keystone is using script(jscript or vbscript) to load controls from external script files, Then web pages will load interactive controls that respond immediately to user input. Be careful that the script written inline programmatically, for example with the writeln function, the loaded control will behave as if it was loaded by the HTML document itself and will require activation.

The detail way is stated clearly in the above article. I need not to copy them here. ^-^

 

PS: I have a question. The requirement to click to activate ActiveX controls is due to security reason. will this solution make us go back to un-secure time we do not install update and need not to click to activate !

0 COMMENTS: